mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-20 13:24:16 -07:00
[InfoExtractor] Use local variants for remaining parent method calls
* ... where defined
This commit is contained in:
parent
6c40d9f847
commit
6eb6d6dff5
2 changed files with 38 additions and 38 deletions
|
@ -42,11 +42,11 @@ class Cache(object):
|
|||
def _to_screen(self, *args, **kwargs):
|
||||
self._ydl.to_screen(*args, **kwargs)
|
||||
|
||||
def _get_params(self, k, default=None):
|
||||
def _get_param(self, k, default=None):
|
||||
return self._ydl.params.get(k, default)
|
||||
|
||||
def _get_root_dir(self):
|
||||
res = self._get_params('cachedir')
|
||||
res = self._get_param('cachedir')
|
||||
if res is None:
|
||||
cache_root = compat_getenv('XDG_CACHE_HOME', '~/.cache')
|
||||
res = os.path.join(cache_root, self._YTDL_DIR)
|
||||
|
@ -61,7 +61,7 @@ class Cache(object):
|
|||
|
||||
@property
|
||||
def enabled(self):
|
||||
return self._get_params('cachedir') is not False
|
||||
return self._get_param('cachedir') is not False
|
||||
|
||||
def store(self, section, key, data, dtype='json'):
|
||||
assert dtype in ('json',)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue