mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-06-30 11:02:54 -05:00
[youtube] Simplify cache_dir code (#1529)
This commit is contained in:
@ -824,3 +824,9 @@ def intlist_to_bytes(xs):
|
||||
return ''.join([chr(x) for x in xs])
|
||||
else:
|
||||
return bytes(xs)
|
||||
|
||||
|
||||
def get_cachedir(params={}):
|
||||
cache_root = os.environ.get('XDG_CACHE_HOME',
|
||||
os.path.expanduser('~/.cache'))
|
||||
return params.get('cachedir', os.path.join(cache_root, 'youtube-dl'))
|
||||
|
Reference in New Issue
Block a user