audio: Use proxy helper in audio utils
This commit is contained in:
parent
9182a7870e
commit
924269616b
@ -10,6 +10,7 @@ import gst # noqa
|
||||
|
||||
from mopidy import compat
|
||||
from mopidy.models import Album, Artist, Track
|
||||
from mopidy.utils import http
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -142,11 +143,7 @@ def setup_proxy(element, config):
|
||||
if not hasattr(element.props, 'proxy') or not config.get('hostname'):
|
||||
return
|
||||
|
||||
proxy = "%s://%s:%d" % (config.get('scheme', 'http'),
|
||||
config.get('hostname'),
|
||||
config.get('port', 80))
|
||||
|
||||
element.set_property('proxy', proxy)
|
||||
element.set_property('proxy', http.format_proxy(config, auth=False))
|
||||
element.set_property('proxy-id', config.get('username'))
|
||||
element.set_property('proxy-pw', config.get('password'))
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user