[youtube] Move cache into its own module

This commit is contained in:
Philipp Hagemeister 2014-09-03 12:41:05 +02:00
parent 88fc294f7f
commit a0e07d3161
6 changed files with 166 additions and 63 deletions

View file

@ -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