forked from Ethanscharlie/Happy-Ripper
Compare commits
3
Commits
7acb9f63a3
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83c2593ff4 | ||
|
|
170914539d | ||
|
|
4060cb672f |
@@ -0,0 +1,21 @@
|
|||||||
|
# Running with Docker
|
||||||
|
TBD
|
||||||
|
|
||||||
|
# Dependences
|
||||||
|
This section is only for people who do not want to use docker.
|
||||||
|
|
||||||
|
## Python Dependences
|
||||||
|
```
|
||||||
|
pip install -r requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
## Deno (JavaScript runtime for ytdlp)
|
||||||
|
For Linux
|
||||||
|
```
|
||||||
|
curl -fsSL https://deno.land/install.sh | sh
|
||||||
|
```
|
||||||
|
|
||||||
|
For Windows
|
||||||
|
```
|
||||||
|
irm https://deno.land/install.ps1 | iex
|
||||||
|
```
|
||||||
+7
-3
@@ -19,9 +19,12 @@ from mutagen.id3 import ID3, APIC
|
|||||||
from flask import Flask, render_template, request, jsonify
|
from flask import Flask, render_template, request, jsonify
|
||||||
from ytmusicapi import YTMusic
|
from ytmusicapi import YTMusic
|
||||||
|
|
||||||
MUSIC_FOLDER = os.environ.get("HAPPY_RIPPER_MUSIC_DIR", "Music")
|
MUSIC_FOLDER: str = os.environ.get("HAPPY_RIPPER_MUSIC_DIR", "Music")
|
||||||
ACCESS_URL = os.environ.get("HAPPY_RIPPER_ACCESS_URL", "https://test.test.test")
|
ACCESS_URL: str = os.environ.get("HAPPY_RIPPER_ACCESS_URL", "https://test.test.test")
|
||||||
PORT = int(os.environ.get("HAPPY_RIPPER_MUSIC_PORT", 5000))
|
PORT = int(os.environ.get("HAPPY_RIPPER_MUSIC_PORT", 5000))
|
||||||
|
DENO_PATH: str = os.environ.get("HAPPY_RIPPER_DENO_PATH", str(pathlib.Path.home() / ".deno/bin/deno"))
|
||||||
|
|
||||||
|
JS_RUNTIME_KEYS = {"deno": {"path": DENO_PATH}}
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@@ -101,7 +104,7 @@ def create_or_wipe_folder(path: str) -> None:
|
|||||||
|
|
||||||
|
|
||||||
def get_content_json(url: str):
|
def get_content_json(url: str):
|
||||||
with YoutubeDL({"playlist_items": "1"}) as ydl:
|
with YoutubeDL({"js_runtimes": JS_RUNTIME_KEYS, "playlist_items": "1"}) as ydl:
|
||||||
return ydl.extract_info(url, download=False)
|
return ydl.extract_info(url, download=False)
|
||||||
|
|
||||||
|
|
||||||
@@ -109,6 +112,7 @@ def download_content(path: str, url: str, post_processor: PostProcessor) -> None
|
|||||||
try:
|
try:
|
||||||
with YoutubeDL(
|
with YoutubeDL(
|
||||||
{
|
{
|
||||||
|
"js_runtimes": JS_RUNTIME_KEYS,
|
||||||
"format": "bestaudio/best",
|
"format": "bestaudio/best",
|
||||||
"ignoreerrors": True,
|
"ignoreerrors": True,
|
||||||
"restrictfilenames": True,
|
"restrictfilenames": True,
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
Flask==3.1.3
|
Flask==3.1.3
|
||||||
mutagen==1.47.0
|
mutagen==1.47.0
|
||||||
yt_dlp==2026.8.19
|
yt_dlp==2026.8.19
|
||||||
|
ytmusicapi==1.12.1
|
||||||
|
|||||||
Reference in New Issue
Block a user