mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-26 04:02:11 +00:00
Allow opts.cachedir == None to disable cache
This commit is contained in:
parent
c705320f48
commit
c3c88a2664
3 changed files with 3 additions and 3 deletions
|
@ -82,7 +82,7 @@ class YoutubeDL(object):
|
||||||
daterange: A DateRange object, download only if the upload_date is in the range.
|
daterange: A DateRange object, download only if the upload_date is in the range.
|
||||||
skip_download: Skip the actual download of the video file
|
skip_download: Skip the actual download of the video file
|
||||||
cachedir: Location of the cache files in the filesystem.
|
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 following parameters are not used by YoutubeDL itself, they are used by
|
||||||
the FileDownloader:
|
the FileDownloader:
|
||||||
|
|
|
@ -618,7 +618,7 @@ def _real_main(argv=None):
|
||||||
'min_filesize': opts.min_filesize,
|
'min_filesize': opts.min_filesize,
|
||||||
'max_filesize': opts.max_filesize,
|
'max_filesize': opts.max_filesize,
|
||||||
'daterange': date,
|
'daterange': date,
|
||||||
'cachedir': opts.cachedir,
|
'cachedir': opts.cachedir if opts.cachedir != 'NONE' else None,
|
||||||
'youtube_print_sig_code': opts.youtube_print_sig_code,
|
'youtube_print_sig_code': opts.youtube_print_sig_code,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -438,7 +438,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
|
||||||
cache_dir = self._downloader.params.get('cachedir',
|
cache_dir = self._downloader.params.get('cachedir',
|
||||||
u'~/.youtube-dl/cache')
|
u'~/.youtube-dl/cache')
|
||||||
|
|
||||||
cache_enabled = cache_dir != u'NONE'
|
cache_enabled = cache_dir is not None
|
||||||
if cache_enabled:
|
if cache_enabled:
|
||||||
cache_fn = os.path.join(os.path.expanduser(cache_dir),
|
cache_fn = os.path.join(os.path.expanduser(cache_dir),
|
||||||
u'youtube-sigfuncs',
|
u'youtube-sigfuncs',
|
||||||
|
|
Loading…
Reference in a new issue