• 1
  • 8
  • 9
  • 10(current)
  • 11
  • 12
  • 20
[Request] TVNZ OnDemand
zeman,

I'm not a python expert either, so we're in the same boat there! The NZ On Screen source looks great, and I'll try to add it as a channel in the next week.

The website seems to use JQuery AJAX for some of its page loading, so this may make it fairly quick to grab the content and easy to scrape it.

I'll just dump the memory of my browser a sec and find out how it's streaming the content - hopefully it's going to be http and follow a simple URL structure!
Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
Reply
Well, that was easier than I thought - I noticed that the site has an HTML5 option, which means that they're using the <video> tag. Once I turned this on and inspected the relevant element in Chrome I saw:

[HTML]<video class="video_stream" src="http://media.nzonscreen.com/0000/3502/4602.0047.HI.flv" preload="false"></video>[/HTML]

I don't think it'll be too hard to scrape this site at all!
Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
Reply
Hi Mark,

Great to see this script happening. I just updated from an earlier version to 1.3.3. I'm getting a "Error - Plugin Failed" box popping up a lot - even though the plugin seems to work.

I also seem to be getting audio cutouts. I've tried different bandwidth's. Low didn't have sound at all? Any suggestions?
ZOTAC IONITX-D-E Intel Atom N330 Dual Core 1.6 GHz NVIDIA ION with LIVE on SSD (now updated to Nvidia Shield Pro (P2897)
Reply
KidKiwi, can you have a delve into your xbmc.log and see what precedes the errors? Failing that, is there a particular folder or folders you get these errors when viewing?

My next version is going to have caching of pages, so that we're not re-downloading a page every time we view it (the cache will be reset every time the plugin's run). I should also have the NZOnScreen stuff sorted out, which won't be too hard as whoever made the site seems to know what they're doing and the HTML is nice and clean.

iSKY is on the backburner for now, although once I've sorted out NZOnScreen and TVNZ searching I may tackle it again.
Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
Reply
markhoney Wrote:KidKiwi, can you have a delve into your xbmc.log and see what precedes the errors? Failing that, is there a particular folder or folders you get these errors when viewing?

My next version is going to have caching of pages, so that we're not re-downloading a page every time we view it (the cache will be reset every time the plugin's run). I should also have the NZOnScreen stuff sorted out, which won't be too hard as whoever made the site seems to know what they're doing and the HTML is nice and clean.

iSKY is on the backburner for now, although once I've sorted out NZOnScreen and TVNZ searching I may tackle it again.

Mark - I'll suss out the log and report back. Any idea on the audio cutting out. Previous versions have worked fine. (this happened on 2 different episodes of Fringe on TVNZ)
ZOTAC IONITX-D-E Intel Atom N330 Dual Core 1.6 GHz NVIDIA ION with LIVE on SSD (now updated to Nvidia Shield Pro (P2897)
Reply
KidKiwi, I have no idea as far as the audio is concerned. All my script does is tell XBMC which URLs to play, and beyond that it's up to XBMC's internals to grab the stream and figure out how to play it. It might be worth trying to use RTMPDump to download a copy of the file locally and then see if XBMC has a problem with playing the downloaded version of the file. I'll add a function to my addon that will write the required rtmpdump command to the log so that you can play a stream in XBMC, and then open the log and use the rtmpdump command to start RTMPDump downloading the file.

I wonder if there's a way of allowing downloading of streams via my plugin, maybe a context menu option for each video to download locally. jmarshall, if you're reading this thread do you have any idea if this would be possible/feasible?
Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
Reply
@markhoney - XBMC internally caches listings if something takes more than 1.5 seconds - this includes plugin listings by default, but we specifically re-request it if the user clicks directly on the listing. You can override that behaviour (i.e. always use the cache) from the c++ side, so it makes sense I think to extend that to the plugin side. ATM on the plugin side it's a bool that defaults to true (i.e. it will be cached) so you can only do cache-if-slow or cache-never.

We'd need to change that to be an object (change in API) that selects between the 3 caching options (never, if slow, always). You'd also need a way to reset the cache for all subpaths (eg when you return to the plugin root after some timeout).

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
@markhoney - nope, you won't be able to download the stream from your plugin as the rtmp stuff is a streamer for dvdplayer - not a virtual filesystem layer.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
markhoney Wrote:KidKiwi, I have no idea as far as the audio is concerned. All my script does is tell XBMC which URLs to play, and beyond that it's up to XBMC's internals to grab the stream and figure out how to play it.

Weird! Here is the debug log. It has some discontinuity errors (whatever they are) for the audio. There are numerous times the plugin error appears during this log session (all the relevant stuff is at the END of the log)

http://pastebin.com/r7if86ku
ZOTAC IONITX-D-E Intel Atom N330 Dual Core 1.6 GHz NVIDIA ION with LIVE on SSD (now updated to Nvidia Shield Pro (P2897)
Reply
So where is the best place to download the plugin, bearing in mind I am running XBMC on an xbox so repos are difficult?
Reply
kalda341, please try my plugin with the new changes to remove the code that was causing your problems. It's not been released yet, so I'll let you know once I've uploaded it to my github account and you can download it and test. Hopefully we can nut out any problems and get it working for the XBox before the next release of my plugin (maybe at the end of the week).

KidKiwi, an example of your audio error is:

Code:
DEBUG: CDVDPlayerAudio:: Discontinuity - was:1422066.412000, should be:371439.909297, error:-1050626.502703
ERROR: CDVDAudio::AddPacketsRenderer - timeout adding data to renderer
ERROR: AddPackets - failed to add leftover bytes to render

This is definitely a problem with something other than my script, as it's an error while playing the content and my script just tells XBMC what content to play. As it does look like a streaming rather than playback issue, I'm guessing that if you downloaded a copy via RTMPDump it'd play okay, but it'd be good to test this just to make sure. I'll have the RTMPDump command creating code in there tonight.

You also have errors like:

Code:
ERROR: GetDirectory - Error getting plugin://plugin.video.nz.ondemand//extrafanart/

and

Code:
ERROR: Traceback (most recent call last):
File "/home/xbmc/.xbmc/addons/plugin.video.nz.ondemand/default.py", line 42, in ? addon = xbmcaddon.Addon(id = sys.argv[0][9:-1]) Exception: Could not get AddonPtr!

The first one's given me an idea to move my fanart images from /resources/images to /extrafanart, which will stop this happening and allow for fanart rotation for skins that support it.

The second one is my bad coding, and it's already been fixed for the XBox problem (the problem was relying on the parent folder name as an indicator of plugin name).

Once I've finished the NZOnScreen stuff I'll request a pull of the code (I shouldn't do it too often as I've already had my wrist slapped for too many pull requests), and hopefully we'll squash some of these errors and (with the extrafanart folder) increase the bling level. And let's face it, XBMC is all about the bling!
Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
Reply
markhoney Wrote:And let's face it, XBMC is all about the bling!
Right On!!! Big Grin

Thx for looking. I'm way passed ignorant when it comes to understanding what the log means.

The audio issue only happens using xbmc centre (I use an Ion & Live) NOT via my Windows Puter.

I'll check back once you have time to look deeper and release a version that updates the issues you pointed out. Thx for your efforts here.
ZOTAC IONITX-D-E Intel Atom N330 Dual Core 1.6 GHz NVIDIA ION with LIVE on SSD (now updated to Nvidia Shield Pro (P2897)
Reply
[QUOTE=

KidKiwi, an example of your audio error is:

Code:
DEBUG: CDVDPlayerAudio:: Discontinuity - was:1422066.412000, should be:371439.909297, error:-1050626.502703
ERROR: CDVDAudio::AddPacketsRenderer - timeout adding data to renderer
ERROR: AddPackets - failed to add leftover bytes to render

This is definitely a problem with something other than my script, as it's an error while playing the content and my script just tells XBMC what content to play. As it does look like a streaming rather than playback issue, I'm guessing that if you downloaded a copy via RTMPDump it'd play okay, but it'd be good to test this just to make sure. I'll have the RTMPDump command creating code in there tonight.

[/quote]

I'm also getting errors like this when I try to play the TV3 OnDemand stuff. Any ideas as to what it could be?
Reply
markhoney, just wanted to say thank you! Works perfectly Smile

I stream one news most nights and check out tv3 stuff if something interests me. I would check out iSky if there was the option but it doesn't bother me if you never had time to code that in Big Grin
Reply
Paaa, no problems - happy to help.

I haven't worked on the plugin in a week or more, but hope to have the NZ On Screen stuff finished by the end of the week. So far it gets as far as listing the programs available (within their respective folders), but doesn't play them. I just need to sort out cookies properly to report Python as an HTML5 capable browser and things should be kind of easy from there.
Author of the NZ OnDemand and ZoneMinder addons, and caretaker of the pyamf script. Contributor to fanart.tv, TheMovieDB and TheTVDB.
Reply
  • 1
  • 8
  • 9
  • 10(current)
  • 11
  • 12
  • 20

Logout Mark Read Team Forum Stats Members Help
[Request] TVNZ OnDemand2