Kodi Community Forum
[RELEASE] Norwegian NRK Web-TV (Video) Plugin - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Video Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=154)
+---- Thread: [RELEASE] Norwegian NRK Web-TV (Video) Plugin (/showthread.php?tid=52824)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47


- pettergulbra - 2010-09-04

Sorry, I will try that. I did`t use the zip, I used the addond inside XBMC.

Edit:
Tried the zip file, from this forum. Works a lot better.

Some small fixes, but it`s not a biig problem.
I tried it for about 5 min, just to se if I could watch different thing, and I could.

But an ex of a foult: If ypu go to nyheter, and the list, september isn`t there. Bit you could fint 1,2 & 3 september inside august.

But like I said, this is the only problem I saw in 5 min.

Kindly

Nice work on this plugin.


- scope - 2010-09-07

Does this plugin work outside Norway? (I suspect not, so might have to set up a VPN). None of the streams work for me


- VictorV - 2010-09-07

They're using some kind of geoblocking yes.


It is SLOW on my system - la5lia - 2010-09-09

I use latest Dahrma beta xbmc and latast nrk.zip I could find.
I take a long time to wait for the folders to load the content. Apart from that it is working, but too slow at the moment.
Any idea why ?

Regards to the team !


- takoi - 2010-09-10

can you please start using some vcs and push to the official repo?


- spiff - 2010-09-10

fyi i have marked the add-on in the repository as broken now.


- oro2 - 2010-09-21

Do anyone know if the NRK addon in the official repository will be fixed again soon?


- kolaf - 2010-09-21

I'm confused, is the version in the repository the same, or different from the one posted here on the previous page?


- spiff - 2010-09-21

different one apparently.


- oro2 - 2010-09-21

I tested the zip in this thread on Dharma beta 2, and when i try to start the plugin, I get an error "Feil, script mislyktes! : nrk".
Any suggestions?


- oro2 - 2010-09-29

I got past the error in the last post now. Maybe i used wrong zip file last time. Now i used plugin.video.nrk.zip.

But i get a lot of other errors when browsing an opening videos. Some works, but many doesn't work. Thumbnails does not work. Alphabetic browsing returns programs which start on another letter than the one i choose.
I can post log files if developer wants to take a look.


- VictorV - 2010-10-16

I'm sorry for not beeing able to create a fix atm. I have some WIP, but also a lot of different things with higher priority.
If omeone want to help that's appreciated. Please contact me. I will be glad to give guidelines and advices for python coding and regular expressions as far as my knowledge goes


- Oddstr13 - 2010-10-22

Hi VictorV!

I'm pretty new to XBMC, and plugins to it, but i do have some knowklade in Python

the addon do accualy work pretty well, "Channels" and "Radio" seems like is working
Podcasts too, but there is a litle bug there, i get an error if the rss feed is empty, so, i'm wondring where the contents of videocasts.xml is from ('hardcoded' or from a website?)

Programs is however broken, the script dosnt parse the videos right, but i can accualy watch some of it... eh.. but it isn't exactly the one i clicked.

i havn't lookd that much on it yet, but that's what i have found out

Code:
06:54:06 T:4444 M:2028183552  NOTICE: "exceptions.UnboundLocalError in parse_feed at line 114 in file","plugin://NRK_API/xbmcplugin_podcast.py","          local variable 'ok' referenced before assignment"

edit: 23. 10. 2010 04:17
okey, so i have had another look at it, and it looks like it's the website structure itself on nrk.no that has changed
i think most of the changes has to be done in api_nrk.py

http://oddstr13.openshell.no/paste/OHd6ZW5qdXFwMQ
i have added a few comments, with URL examples i think lead to the right pages, but i don't know if it's the right ones

edit2: 24.10. 2010 00:00
VictorV: yes, a breakdown of what the regexes does would be werry helpfull, and maybe a litle pointer on what's supos'd to show up on the difrent pages (get_all_shows, get_live_shows, get_shows_by_theme and so on)

edit3: 24.10. 2010 17:52
i think this dos the trick of getting the items from http://www.nrk.no/nett-tv/bokstav/@/
but i'm not 100% sure what results extract.catalog is supos'd to return
http://oddstr13.openshell.no/paste/dWV3cGJubzl4aw


- VictorV - 2010-10-25

When I wrote the script, I used names from NRK's "API", but it is confusing even for me now. All the playlist stuff should be ignored and even totaly removed.

get_live_shows: this was used before NRK offered their channels for live streaming. Ignore it
get_shows_by_theme: all productions in a specified category
get_all_shows: all productions listed with the bokstav/@

extract.catalog() should return a MediaObj-class. It's used like a dict, and stores the title, thumbnail and other information "extracted" from the data you passed. It's also should contain a key-class who handles the parameters for setting the state to the plugin.

Code:
from utils import Key
myObj = MediaObj(title='Xbmc television series', thumbnail='http://xbmc.org/image.png')
myObj.key = Key(type='programs', id='programid')
#Above will produce a command line like myPath/myScript.py?__prefix__&&title='Xbmc television series'&thumbnail='http://xbmc.org/image.png' and url encode it
#standard notation used for integers arrays, strings and so on

To read parameters:
Code:
key = Key( sys.argv[2] )
print key.id
# >>> programid

It's also important how you receive the documents. I prefer to pass the silverlight enabled in a cookie passed with the header. You will also need to pass a bitrate for the connnection, else you will be redirected to a setup-document

http://www.nrk.no/nett-tv/menyfragment.aspx?type=category&id=8500
above url is some of the old ajax-api they used that still remains, and you will need this to fetch info of the tree structure for a productions

I like to use regex myself as I find it faster and with less code. The regex in the plugin are pretty straight forward, and looks for a flexible patterni the document, but since the regex used was wrote for the old nett-tv I won't try breaking them up and explain them.


Edit: If you want more detailed information about something, I would prefer IM in norwegian


- dsgh - 2010-10-29

Does anyone know where I can download the most updated version of the NRK plugin?