aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-09-24 21:04:43 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2013-09-24 21:04:43 +0200
commitc3c88a2664595fd62898e44f8fc93c84e6d3c5a4 (patch)
tree8a70cc424526998dbc1e346a64fbc858266dd7ba /youtube_dl
parentc705320f485cd962827fce464a93993569e3173f (diff)
Allow opts.cachedir == None to disable cache
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/YoutubeDL.py2
-rw-r--r--youtube_dl/__init__.py2
-rw-r--r--youtube_dl/extractor/youtube.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index ead1ccb1c..a3a351ee6 100644
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -82,7 +82,7 @@ class YoutubeDL(object):
daterange: A DateRange object, download only if the upload_date is in the range.
skip_download: Skip the actual download of the video file
cachedir: Location of the cache files in the filesystem.
- "NONE" to disable filesystem cache.
+ None to disable filesystem cache.
The following parameters are not used by YoutubeDL itself, they are used by
the FileDownloader:
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index a4769a8ae..ebf4a300f 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -618,7 +618,7 @@ def _real_main(argv=None):
'min_filesize': opts.min_filesize,
'max_filesize': opts.max_filesize,
'daterange': date,
- 'cachedir': opts.cachedir,
+ 'cachedir': opts.cachedir if opts.cachedir != 'NONE' else None,
'youtube_print_sig_code': opts.youtube_print_sig_code,
})
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index 049da2f91..a6eefdf4e 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -438,7 +438,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
cache_dir = self._downloader.params.get('cachedir',
u'~/.youtube-dl/cache')
- cache_enabled = cache_dir != u'NONE'
+ cache_enabled = cache_dir is not None
if cache_enabled:
cache_fn = os.path.join(os.path.expanduser(cache_dir),
u'youtube-sigfuncs',