parent
05733cf844
commit
f9da3fe3e9
@ -36,9 +36,11 @@ class SpotifySessionManager(process.BaseThread, PyspotifySessionManager):
|
||||
full_proxy = ''
|
||||
if config['proxy']['hostname']:
|
||||
full_proxy = config['proxy']['hostname']
|
||||
# Add proxy port only if available
|
||||
# Add proxy port and scheme only if available
|
||||
if config['proxy']['port']:
|
||||
full_proxy = full_proxy + ':' + str(config['proxy']['port'])
|
||||
full_proxy += ':' + str(config['proxy']['port'])
|
||||
if config['proxy']['scheme']:
|
||||
full_proxy = config['proxy']['scheme'] + "://" + full_proxy
|
||||
|
||||
PyspotifySessionManager.__init__(
|
||||
self, config['spotify']['username'], config['spotify']['password'],
|
||||
|
||||
@ -26,10 +26,12 @@ _audio_schema['mixer_track'] = String(optional=True)
|
||||
_audio_schema['output'] = String()
|
||||
|
||||
_proxy_schema = ConfigSchema('proxy')
|
||||
_proxy_schema['scheme'] = String(optional=True,
|
||||
choices=['', 'https', 'socks4', 'socks5'])
|
||||
_proxy_schema['hostname'] = Hostname(optional=True)
|
||||
_proxy_schema['port'] = Port()
|
||||
_proxy_schema['username'] = String(optional=True)
|
||||
_proxy_schema['password'] = Secret(optional=True)
|
||||
_proxy_schema['port'] = Port()
|
||||
|
||||
# NOTE: if multiple outputs ever comes something like LogLevelConfigSchema
|
||||
#_outputs_schema = config.AudioOutputConfigSchema()
|
||||
|
||||
@ -13,7 +13,8 @@ mixer_track =
|
||||
output = autoaudiosink
|
||||
|
||||
[proxy]
|
||||
scheme =
|
||||
hostname =
|
||||
port =
|
||||
username =
|
||||
password =
|
||||
port =
|
||||
|
||||
@ -245,7 +245,6 @@ class Port(Integer):
|
||||
return value
|
||||
|
||||
|
||||
|
||||
class Path(ConfigValue):
|
||||
"""File system path
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user