Posts: 50
Joined: Feb 2010
Reputation:
0
Hi guys,
I use this addon mainly to listen to live radio, and I realised that regardless what quality you selected in the settings, the audio was in the "normal" format 128Kbps. As a reslut, I did some changes to the create_live_channel function:
def create_live_channel(channel):
QUALITIES = ["lo", "normal", "hi"]
FORMATS = ["mp3", "aac"]
quality = plugin.get_setting('quality', choices=QUALITIES)
format = plugin.get_setting('format', choices=FORMATS)
name = channel['name']
id = channel['liveaudio']['id']
if quality == "normal":
url = "http://sverigesradio.se/topsy/direkt/" + str(id) + "." + format
else:
url = "http://sverigesradio.se/topsy/direkt/" + str(id) + "-" + quality + "." + format
logo = channel['image']
item = {'label': name, 'path': url, 'icon': logo, 'is_playable': True}
return item
As you can see from above, I also added the choice of setting the codec mp3 or aac.
And with this it's actually possible to change the quality and codec, at least for the live channels.
- Janne
Posts: 101
Joined: Jan 2010
Reputation:
3
I've added support for live stream quality settings and live sports. Feel free to download from github, or wait for the official repo to update
Posts: 2
Joined: Jan 2016
Reputation:
0
(Long time no post!)
I can't find [url="https://sverigesradio.se/sida/avsnitt?programid=5166"]Punani_99[/url] in the Program listing. Why is that?