mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-23 21:46:44 +00:00
Rename old_youtube_cache_dirs
It makes sense to do this here because anyone who had the previous setting was, more than likely, using this file.
This commit is contained in:
parent
2f89c333a4
commit
42a1033e7e
@ -88,3 +88,13 @@ SOURCE_DOWNLOAD_DIRECTORY_PREFIX = True if SOURCE_DOWNLOAD_DIRECTORY_PREFIX_STR
|
|||||||
|
|
||||||
|
|
||||||
VIDEO_HEIGHT_CUTOFF = int(os.getenv("TUBESYNC_VIDEO_HEIGHT_CUTOFF", "240"))
|
VIDEO_HEIGHT_CUTOFF = int(os.getenv("TUBESYNC_VIDEO_HEIGHT_CUTOFF", "240"))
|
||||||
|
|
||||||
|
|
||||||
|
# ensure that the current directory exists
|
||||||
|
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-*'))
|
||||||
|
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