M README.md +1 -1
@@ 27,7 27,7 @@ providers =
```
[multisonic]
providers =
- banalisation: https://mr_banal:azerty@music.banalserver.com?max_bit_rate=320
+ banalisation: https://mr_banal:azerty@music.banalserver.com?max_bit_rate=320&format=mp3
```
```
M mopidy_multisonic/backend.py +3 -2
@@ 22,7 22,7 @@ def parse_raw_options(raw_options):
return options
def load_http_client_config(provider):
- match = re.match(r'^([^:]+):(?: )?([^:]+)://([^:]+):([^@]+)@([^?]+)(\?([^=]+=[^&]+)+)?', provider)
+ match = re.match(r'^([^:]+):(?: )?([^:]+)://([^:]+):([^@]+)@([^?]+)(\?(.+))?', provider)
name=match.group(1)
protocol=match.group(2)
@@ 38,7 38,8 @@ def load_http_client_config(provider):
url=protocol + "://" + url,
username=username,
password=password,
- max_bit_rate=options.get("max_bit_rate")
+ max_bit_rate=options.get("max_bit_rate"),
+ format=options.get("format")
)
def load_http_client_configs(config):
M mopidy_multisonic/httpclient.py +3 -0
@@ 11,6 11,7 @@ HttpClientConfig = namedtuple(
'username',
'password',
'max_bit_rate',
+ 'format',
]
)
@@ 93,6 94,8 @@ def get_stream(client_config, id):
if client_config.max_bit_rate:
params["maxBitRate"] = client_config.max_bit_rate,
+ if client_config.format:
+ params["format"] = client_config.format,
return get_request(client_config, "/rest/stream", params)