|
|
@ -1217,19 +1217,15 @@ def parseOpts(overrideArguments=None):
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
def read_options(path, user=False):
|
|
|
|
def read_options(path, user=False):
|
|
|
|
func = _readUserConf if user else _readOptions
|
|
|
|
for package in ('yt-dlp', 'youtube-dlc'):
|
|
|
|
current_path = os.path.join(path, 'yt-dlp.conf')
|
|
|
|
|
|
|
|
config = func(current_path, default=None)
|
|
|
|
|
|
|
|
if user:
|
|
|
|
if user:
|
|
|
|
config, current_path = config
|
|
|
|
config, current_path = _readUserConf(package, default=None)
|
|
|
|
if config is None:
|
|
|
|
else:
|
|
|
|
current_path = os.path.join(path, 'youtube-dlc.conf')
|
|
|
|
current_path = os.path.join(path, '%s.conf' % package)
|
|
|
|
config = func(current_path, default=None)
|
|
|
|
config = _readOptions(current_path, default=None)
|
|
|
|
if user:
|
|
|
|
if config is not None:
|
|
|
|
config, current_path = config
|
|
|
|
|
|
|
|
if config is None:
|
|
|
|
|
|
|
|
return [], None
|
|
|
|
|
|
|
|
return config, current_path
|
|
|
|
return config, current_path
|
|
|
|
|
|
|
|
return [], None
|
|
|
|
|
|
|
|
|
|
|
|
configs['portable'], paths['portable'] = read_options(get_executable_path())
|
|
|
|
configs['portable'], paths['portable'] = read_options(get_executable_path())
|
|
|
|
if '--ignore-config' in configs['portable']:
|
|
|
|
if '--ignore-config' in configs['portable']:
|
|
|
|