mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-22 04:56:35 +00:00
Use the default cache path for yt-dlp
This commit is contained in:
parent
74780220f4
commit
d8e9fa21fd
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user