diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-10-02 08:41:03 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-10-02 08:41:14 +0200 |
commit | c38b1e776dcc525b6fbe0660c484f1d50d2e0165 (patch) | |
tree | b956c4d52962f9d6702ad906c1ff465b8ba52fde /youtube_dl/__init__.py | |
parent | 4f8bf17f23e2366205d8670fc9af2568063f7e89 (diff) |
[youtube] Simplify cache_dir code (#1529)
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r-- | youtube_dl/__init__.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index cc771ee89..62b557986 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -113,12 +113,6 @@ def parseOpts(overrideArguments=None): pass return opts - xdg_cache_home = os.environ.get('XDG_CACHE_HOME') - if xdg_cache_home: - userCacheDir = os.path.join(xdg_cache_home, 'youtube-dl') - else: - userCacheDir = os.path.join(os.path.expanduser('~'), '.cache', 'youtube-dl') - max_width = 80 max_help_position = 80 @@ -174,7 +168,7 @@ def parseOpts(overrideArguments=None): general.add_option('--proxy', dest='proxy', default=None, help='Use the specified HTTP/HTTPS proxy', metavar='URL') general.add_option('--no-check-certificate', action='store_true', dest='no_check_certificate', default=False, help='Suppress HTTPS certificate validation.') general.add_option( - '--cache-dir', dest='cachedir', default=userCacheDir, + '--cache-dir', dest='cachedir', default=get_cachedir(), help='Location in the filesystem where youtube-dl can store downloaded information permanently. %default by default') general.add_option( '--no-cache-dir', action='store_const', const=None, dest='cachedir', |