[youtube] Move cache into its own module
This commit is contained in:
parent
88fc294f7f
commit
a0e07d3161
6 changed files with 166 additions and 63 deletions
|
@ -1076,12 +1076,6 @@ def intlist_to_bytes(xs):
|
|||
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'))
|
||||
|
||||
|
||||
# Cross-platform file locking
|
||||
if sys.platform == 'win32':
|
||||
import ctypes.wintypes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue