Open petterreinholdtsen opened 8 years ago
One thing occured to me. The web site have scaling issues. We should make sure the API and web site can take the load before we automatically start using it from the kodi plugin.
This seems like a nice feature for 0.0.2
. Have you started on this? Maybe we
should structure our code like tamland has done with the routing in the NRK
plugin and introduce a new file frikanalen.py
? It should be pretty straight
forward.
Do you have any good testing strategies. I have just been copying over the plugin as zip and manually installing. That works okay with a new install, but updating the plugin has just failed for me. So I do a uninstall or flash the SD card and install. It's very tedious...
Can you please elaborate on the scaling issues. That might make it easier for readers to understand the issues or eventually chim in and offer suggestions for improvement.
[Alexander Alemayhu]
This seems like a nice feature for
0.0.2
. Have you started on this?
Nope, have not started coding. Doubt I will find time to do so any time soon. :)
Maybe we should structure our code like tamland has done with the routing in the NRK plugin and introduce a new file
frikanalen.py
? It should be pretty straight forward.
Worth a try. :)
Do you have any good testing strategies.
Not really.
Can you please elaborate on the scaling issues. That might make it easier for readers to understand the issues or eventually chim in and offer suggestions for improvement.
The scaling issues is based on the fact that the calendar web pages become very slow when I use the API to update the schedule automatically from a script. This make me believe the API is not able to handle many users / transactions and should be improved.
Happy hacking Petter Reinholdtsen
I created https://github.com/Frikanalen/frikanalen/issues/94 to track the slowdown / scaling issue in the API.
Looking at the NRK nett plugin, it does not seem like they are showing meta information on the live stuff. Already streamed video on other hand provides "$TITLE (MM:SS)\n$DESCRIPTION" in the player view. e.g "Min galaktiske forsvarer (12:52)\nFransk animasjonsserie om en vennegjeng som hjelper utenomjordiske tilbake til sin planet.". I will look into the xbmc properties we can set.
I think it makes sense to first start out by getting today, so a request to:
http://beta.frikanalen.no/api/scheduleitems/?date=today
should give us a nice number of entries.
We now show the schedule for the day in /schedule
, but there is still some work left in order to actually read the starttime
and figure out if that is within the range of the current time.
I've been trying to figure out if there is a way to tell kodi which program is currently playing in the live stream, without any luck so far. Anyone got any clue how to add such metadata?
I've also tried to figure out if we can feed some kind of program guide, without any luck.
I will look at it, this weekend. Sorry for the delay.
Set aside some time to look at this today, but having issues with the API. I suspect there might be some recent API deployment that broke something for the schedule items, tried asking about it on IRC. Either way saw you released version 0.0.3, great work @petterreinholdtsen!
[Alexander Alemayhu]
Set aside some time to look at this today, but having issues with the API. I suspect there might be some recent API deployment that broke something for the schedule items, tried asking about it on IRC. Either way saw you released version 0.0.3, great work @petterreinholdtsen!
Yeah, the site was broken today after a problem with the duration storage in the database. Odin fixed it in the afternoon, see <URL: https://github.com/Frikanalen/frikanalen/commits/master >.
The API is back. :)
-- Happy hacking Petter Reinholdtsen
Frikanalen provides its schedule in many formats, and I suspect one of them can be used by this add-on to show what is currently being broadcasted on Frikanalen. I suspect the XMLTV version available from http://beta.frikanalen.no/xmltv/ might be the best option, but it is also available from the API, http://beta.frikanalen.no/api/ , and two web pages http://beta.frikanalen.no/calendar/ and http://beta.frikanalen.no/guide/ .