[options] Read ini files in windows
This commit is contained in:
parent
57e1fb6532
commit
7fada6e36e
@ -781,16 +781,21 @@ def parseOpts(overrideArguments=None):
|
||||
userConf = _readOptions(userConfFile, None)
|
||||
userIni = _readIni(userIniFile, None)
|
||||
|
||||
if userConf is None:
|
||||
if userConf is None or userIni is None:
|
||||
appdata_dir = compat_getenv('appdata')
|
||||
if appdata_dir:
|
||||
userConf = _readOptions(
|
||||
os.path.join(appdata_dir, 'youtube-dl', 'config'),
|
||||
default=None)
|
||||
if userConf is None:
|
||||
userConf = _readOptions(
|
||||
os.path.join(appdata_dir, 'youtube-dl', 'config'),
|
||||
default=None)
|
||||
if userConf is None:
|
||||
userConf = _readOptions(
|
||||
os.path.join(appdata_dir, 'youtube-dl', 'config.txt'),
|
||||
default=None)
|
||||
if userIni is None:
|
||||
userIni = _readIni(
|
||||
os.path.join(appdata_dir, 'youtube-dl', 'config.ini'),
|
||||
default=None)
|
||||
|
||||
if userConf is None:
|
||||
userConf = _readOptions(
|
||||
@ -801,6 +806,15 @@ def parseOpts(overrideArguments=None):
|
||||
os.path.join(compat_expanduser('~'), 'youtube-dl.conf.txt'),
|
||||
default=None)
|
||||
|
||||
if userIni is None:
|
||||
userIni = _readIni(
|
||||
os.path.join(compat_expanduser('~'), 'youtube-dl.ini'),
|
||||
default=None)
|
||||
if userIni is None:
|
||||
userIni = _readIni(
|
||||
os.path.join(compat_expanduser('~'), 'youtube-dl.ini.txt'),
|
||||
default=None)
|
||||
|
||||
if userConf is None:
|
||||
userConf = []
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user