Updated monochrome and votify
This commit is contained in:
@@ -170,16 +170,19 @@ def run_download(job_id: str, urls: list[str], options: dict,
|
||||
effective_output = output_path or str(user_dir)
|
||||
|
||||
cmd = ["votify"]
|
||||
# Ignore ~/.votify/config.ini so job behaviour depends only on these flags.
|
||||
cmd.append("--no-config-file")
|
||||
cmd.extend(["--cookies-path", str(COOKIES_PATH)])
|
||||
cmd.extend(["--output-path", effective_output])
|
||||
cmd.extend(["--temp-path", str(TEMP_DIR)])
|
||||
cmd.extend(["--output", effective_output])
|
||||
cmd.extend(["--temp", str(TEMP_DIR)])
|
||||
if WVD_PATH.exists():
|
||||
cmd.extend(["--wvd-path", str(WVD_PATH)])
|
||||
|
||||
cmd.extend(["--template-folder-album", "."])
|
||||
cmd.extend(["--template-folder-compilation", "."])
|
||||
cmd.extend(["--template-folder-episode", "."])
|
||||
cmd.extend(["--template-folder-music-video", "."])
|
||||
# Download flat into the output dir; post_process_votify_files() handles layout.
|
||||
cmd.extend(["--album-folder-template", "."])
|
||||
cmd.extend(["--compilation-folder-template", "."])
|
||||
cmd.extend(["--podcast-folder-template", "."])
|
||||
cmd.extend(["--no-album-folder-template", "."])
|
||||
|
||||
quality = options.get("audio_quality", "aac-medium")
|
||||
if quality:
|
||||
@@ -187,7 +190,7 @@ def run_download(job_id: str, urls: list[str], options: dict,
|
||||
|
||||
download_mode = options.get("download_mode", "ytdlp")
|
||||
if download_mode:
|
||||
cmd.extend(["--download-mode", download_mode])
|
||||
cmd.extend(["--audio-download-mode", download_mode])
|
||||
|
||||
video_format = options.get("video_format", "mp4")
|
||||
if video_format:
|
||||
@@ -198,17 +201,17 @@ def run_download(job_id: str, urls: list[str], options: dict,
|
||||
cmd.extend(["--cover-size", cover_size])
|
||||
|
||||
if options.get("save_cover"):
|
||||
cmd.append("--save-cover")
|
||||
cmd.append("--save-cover-file")
|
||||
if options.get("save_playlist"):
|
||||
cmd.append("--save-playlist")
|
||||
cmd.append("--save-playlist-file")
|
||||
if options.get("overwrite"):
|
||||
cmd.append("--overwrite")
|
||||
if options.get("download_music_videos"):
|
||||
cmd.append("--download-music-videos")
|
||||
cmd.append("--prefer-video")
|
||||
if options.get("save_lrc"):
|
||||
cmd.append("--lrc-only")
|
||||
cmd.append("--synced-lyrics-only")
|
||||
if options.get("no_lrc"):
|
||||
cmd.append("--no-lrc")
|
||||
cmd.append("--no-synced-lyrics-file")
|
||||
|
||||
truncate = options.get("truncate")
|
||||
if truncate:
|
||||
@@ -649,9 +652,9 @@ def get_artwork():
|
||||
best = max(images, key=lambda img: img.get("maxWidth", 0))
|
||||
url = best["url"]
|
||||
|
||||
# Upscale to 2000×2000 using the same CDN key technique as votify-fix.
|
||||
# Upscale to 2000×2000 using the same CDN key technique as votify.
|
||||
# Spotify CDN filenames: first 16 hex chars = size key, remainder = image hash.
|
||||
# Source: GladistonXD/votify-fix constants.py COVER_SIZE_X_KEY_MAPPING_SONG
|
||||
# Source: glomatico/votify votify/interface/constants.py COVER_SIZE_ID_MAP_SONG
|
||||
EXTRA_LARGE_KEY = "ab67616d000082c1"
|
||||
parts = url.rsplit("/", 1)
|
||||
if len(parts) == 2 and len(parts[1]) >= 16:
|
||||
|
||||
Reference in New Issue
Block a user