[RELEASE] Sveriges Radio
#31
(2015-05-10, 21:49)nybogard Wrote: It would be nice if you where able to browse the whole back-catalog of episodes for a program, not just the last five.

Currently the add-on is using api.sr.se/api/v2/broadcasts for fetching the episodes. If you used api.sr.se/api/v2/episodes instead you could fetch virtually any episodes.

Good catch! I'll see if I can find some free time in the coming days.

I have a longterm plan to rewrite the plugin to use a framework, should make it easier for other people to understand/contribute.

/D
Reply
#32
(2015-05-11, 09:08)dodoadoodoo Wrote:
(2015-05-10, 21:49)nybogard Wrote: It would be nice if you where able to browse the whole back-catalog of episodes for a program, not just the last five.

Currently the add-on is using api.sr.se/api/v2/broadcasts for fetching the episodes. If you used api.sr.se/api/v2/episodes instead you could fetch virtually any episodes.

Good catch! I'll see if I can find some free time in the coming days.

I have a longterm plan to rewrite the plugin to use a framework, should make it easier for other people to understand/contribute.

/D

So, finally did the rewrite (guess that is what vacations are for). Please download from my github and test, and please send any feedback. If all good, I'll request an update to the official repository.

https://github.com/dodoadoodoo/kodi-sverigesradio

/D
Reply
#33
(2015-07-14, 12:15)dodoadoodoo Wrote:
(2015-05-11, 09:08)dodoadoodoo Wrote:
(2015-05-10, 21:49)nybogard Wrote: It would be nice if you where able to browse the whole back-catalog of episodes for a program, not just the last five.

Currently the add-on is using api.sr.se/api/v2/broadcasts for fetching the episodes. If you used api.sr.se/api/v2/episodes instead you could fetch virtually any episodes.

Good catch! I'll see if I can find some free time in the coming days.

I have a longterm plan to rewrite the plugin to use a framework, should make it easier for other people to understand/contribute.

/D

So, finally did the rewrite (guess that is what vacations are for). Please download from my github and test, and please send any feedback. If all good, I'll request an update to the official repository.

https://github.com/dodoadoodoo/kodi-sverigesradio

/D

I have finally (sorry about the wait) sat down and tested out the new code. Haven't run in to any bugs yet.
I really like that when you click on a program it lists all broadcasts regardless of if music is included or not.
It feels ready for the official repository. (If possible, use git tag so that the official versions shows up as releases on github.)

Good job! Smile
Reply
#34
(2015-08-31, 23:01)nybogard Wrote: I have finally (sorry about the wait) sat down and tested out the new code. Haven't run in to any bugs yet.
I really like that when you click on a program it lists all broadcasts regardless of if music is included or not.
It feels ready for the official repository. (If possible, use git tag so that the official versions shows up as releases on github.)

Good job! Smile

Thanks. Should be in the official repo now

/D
Reply
#35
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
Reply
#36
(2016-04-28, 20:00)JanneT Wrote: 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

Hej!

Nice work. Do you mind submitting a PR against my repo?

TIA
/D
Reply
#37
(2016-04-29, 09:56)dodoadoodoo Wrote:
(2016-04-28, 20:00)JanneT Wrote: 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

Hej!

Nice work. Do you mind submitting a PR against my repo?

TIA
/D


Sorry, how do I do that? I'm not that familiar with the procedures Blush
Reply
#38
(2016-05-08, 09:22)JanneT Wrote:
(2016-04-29, 09:56)dodoadoodoo Wrote: Nice work. Do you mind submitting a PR against my repo?


Sorry, how do I do that? I'm not that familiar with the procedures Blush

Register on github (if you haven't already), fork my repo, branch, fix, submit PR. Or something reasonably close to that. Since you were able to track down and fix the bug, I am confident that you will manage :-)

/D
Reply
#39
(2016-05-08, 21:50)dodoadoodoo Wrote:
(2016-05-08, 09:22)JanneT Wrote:
(2016-04-29, 09:56)dodoadoodoo Wrote: Nice work. Do you mind submitting a PR against my repo?


Sorry, how do I do that? I'm not that familiar with the procedures Blush

Register on github (if you haven't already), fork my repo, branch, fix, submit PR. Or something reasonably close to that. Since you were able to track down and fix the bug, I am confident that you will manage :-)

/D

I made the changes on github. (I hope I got it all Smile)
Reply
#40
(2016-05-09, 18:13)JanneT Wrote:
(2016-05-08, 21:50)dodoadoodoo Wrote:
(2016-05-08, 09:22)JanneT Wrote: Sorry, how do I do that? I'm not that familiar with the procedures Blush

Register on github (if you haven't already), fork my repo, branch, fix, submit PR. Or something reasonably close to that. Since you were able to track down and fix the bug, I am confident that you will manage :-)

/D

I made the changes on github. (I hope I got it all Smile)

Almost there, all that's missing is a pull request with your changes back to my repo :-)

/D
Reply
#41
(2016-05-09, 22:17)dodoadoodoo Wrote:
(2016-05-09, 18:13)JanneT Wrote:
(2016-05-08, 21:50)dodoadoodoo Wrote: Register on github (if you haven't already), fork my repo, branch, fix, submit PR. Or something reasonably close to that. Since you were able to track down and fix the bug, I am confident that you will manage :-)

/D

I made the changes on github. (I hope I got it all Smile)

Almost there, all that's missing is a pull request with your changes back to my repo :-)

/D

Oh, I thought I did that. Anyway I made a new attempt
Reply
#42
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
Reply
#43
(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?
Reply
#44
Is this add-on broken / abandoned? It seems to not have been updated for a long time in the official repo, it is still version 2.0.0 there. I have also tried version 2.1.0 from the GitHub page.

I can only get the program listing to work, both "Live" and "Channels" are broken.

In the log I have the following https://paste.kodi.tv/komokujala.kodi
Reply
#45
(2019-10-13, 21:18)Glyphs Wrote: Is this add-on broken / abandoned? It seems to not have been updated for a long time in the official repo, it is still version 2.0.0 there. I have also tried version 2.1.0 from the GitHub page.

I can only get the program listing to work, both "Live" and "Channels" are broken.

In the log I have the following https://paste.kodi.tv/komokujala.kodi
Looks like the API changed or I'm using it wrong. I need to take a look at this...

/D
Reply

Logout Mark Read Team Forum Stats Members Help
[RELEASE] Sveriges Radio0