Added Deno
This commit is contained in:
+7
-3
@@ -19,9 +19,12 @@ from mutagen.id3 import ID3, APIC
|
||||
from flask import Flask, render_template, request, jsonify
|
||||
from ytmusicapi import YTMusic
|
||||
|
||||
MUSIC_FOLDER = os.environ.get("HAPPY_RIPPER_MUSIC_DIR", "Music")
|
||||
ACCESS_URL = os.environ.get("HAPPY_RIPPER_ACCESS_URL", "https://test.test.test")
|
||||
MUSIC_FOLDER: str = os.environ.get("HAPPY_RIPPER_MUSIC_DIR", "Music")
|
||||
ACCESS_URL: str = os.environ.get("HAPPY_RIPPER_ACCESS_URL", "https://test.test.test")
|
||||
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
|
||||
@@ -101,7 +104,7 @@ def create_or_wipe_folder(path: str) -> None:
|
||||
|
||||
|
||||
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)
|
||||
|
||||
|
||||
@@ -109,6 +112,7 @@ def download_content(path: str, url: str, post_processor: PostProcessor) -> None
|
||||
try:
|
||||
with YoutubeDL(
|
||||
{
|
||||
"js_runtimes": JS_RUNTIME_KEYS,
|
||||
"format": "bestaudio/best",
|
||||
"ignoreerrors": True,
|
||||
"restrictfilenames": True,
|
||||
|
||||
Reference in New Issue
Block a user