From d8e9fa21fde13cbe3fa496c2b322e22aeb2c1557 Mon Sep 17 00:00:00 2001 From: tcely Date: Tue, 18 Feb 2025 19:03:32 -0500 Subject: [PATCH] Use the default cache path for `yt-dlp` --- tubesync/tubesync/local_settings.py.container | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tubesync/tubesync/local_settings.py.container b/tubesync/tubesync/local_settings.py.container index 9d975ac6..5c61bf64 100644 --- a/tubesync/tubesync/local_settings.py.container +++ b/tubesync/tubesync/local_settings.py.container @@ -57,7 +57,7 @@ BACKGROUND_TASK_ASYNC_THREADS = int(os.getenv('TUBESYNC_WORKERS', DEFAULT_THREAD MEDIA_ROOT = CONFIG_BASE_DIR / 'media' DOWNLOAD_ROOT = DOWNLOADS_BASE_DIR -YOUTUBE_DL_CACHEDIR = CONFIG_BASE_DIR / 'cache/youtube' +YOUTUBE_DL_CACHEDIR = CONFIG_BASE_DIR / 'cache/yt-dlp' YOUTUBE_DL_TEMPDIR = DOWNLOAD_ROOT / 'cache' COOKIES_FILE = CONFIG_BASE_DIR / 'cookies.txt' @@ -106,6 +106,7 @@ if not YOUTUBE_DL_CACHEDIR.is_dir(): YOUTUBE_DL_CACHEDIR.mkdir(parents=True) # rename any old yt_dlp cache directories to the current directory old_youtube_cache_dirs = list(YOUTUBE_DL_CACHEDIR.parent.glob('youtube-*')) +old_youtube_cache_dirs.extend(list(YOUTUBE_DL_CACHEDIR.parent.glob('youtube/youtube-*'))) for cache_dir in old_youtube_cache_dirs: cache_dir.rename(YOUTUBE_DL_CACHEDIR / cache_dir.name)