diff --git a/build_macos.py b/build_macos.py index ab96338..c15ef50 100644 --- a/build_macos.py +++ b/build_macos.py @@ -39,21 +39,23 @@ def log(msg): # 1. Scarica yt-dlp standalone # ========================================================================= def download_ytdlp(): - """Scarica il binario standalone di yt-dlp per macOS.""" + """Scarica il binario standalone di yt-dlp per macOS. + + Usa il NIGHTLY channel invece dello stable perche' YouTube rompe le + API ogni 1-2 settimane e la stable resta indietro di 3-4 settimane + tipicamente. La nightly esce quasi ogni giorno con i fix. + Sempre re-download: garantisce che ogni build imbarca yt-dlp fresco. + """ arch = platform.machine() # arm64 o x86_64 if arch == "arm64": - url = "https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_macos" + url = "https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/latest/download/yt-dlp_macos" else: - url = "https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_macos_legacy" + url = "https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/latest/download/yt-dlp_macos_legacy" dest = BUNDLE_DIR / "yt-dlp" - if dest.exists(): - log(f"yt-dlp gia presente: {dest}") - return dest - - log(f"Scarico yt-dlp da {url} ...") BUNDLE_DIR.mkdir(parents=True, exist_ok=True) + log(f"Scarico yt-dlp nightly da {url} ...") # Usa curl perche urllib di Python 3.8 ha problemi SSL su macOS subprocess.run( ["curl", "-L", "-o", str(dest), url], diff --git a/build_windows.py b/build_windows.py index 0cd57a9..d879c74 100644 --- a/build_windows.py +++ b/build_windows.py @@ -29,7 +29,7 @@ BUILD_DIR = ROOT / "build" DIST_DIR = ROOT / "dist" BUNDLE_DIR = ROOT / "bundle_bin" -YTDLP_URL = "https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe" +YTDLP_URL = "https://github.com/yt-dlp/yt-dlp-nightly-builds/releases/latest/download/yt-dlp.exe" FFMPEG_URL = "https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl.zip" FPCALC_URL = ("https://github.com/acoustid/chromaprint/releases/download/" "v1.5.1/chromaprint-fpcalc-1.5.1-windows-x86_64.zip") @@ -43,13 +43,11 @@ def log(msg): # 1. Scarica yt-dlp.exe # ========================================================================= def download_ytdlp(): + """Scarica sempre il nightly fresco: la stable resta indietro di + 3-4 settimane rispetto alle rotture API YouTube.""" dest = BUNDLE_DIR / "yt-dlp.exe" - if dest.exists(): - log(f"yt-dlp.exe gia presente: {dest}") - return dest - - log(f"Scarico yt-dlp.exe ...") BUNDLE_DIR.mkdir(parents=True, exist_ok=True) + log(f"Scarico yt-dlp.exe nightly ...") urllib.request.urlretrieve(YTDLP_URL, dest) log(f"yt-dlp.exe scaricato ({dest.stat().st_size // 1024 // 1024} MB)") return dest diff --git a/core/config.py b/core/config.py index 0f82fe1..88bbfff 100644 --- a/core/config.py +++ b/core/config.py @@ -5,7 +5,7 @@ import os import sys from pathlib import Path -VERSION = "v1.11.1" +VERSION = "v1.11.2" APP_NAME = "MusicTools"