Kodi Community Forum

Full Version: [RELEASE] iPlayer - BBC Video and Music Plugin (UK only!)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
SVN HEAD now has json support by default. I just tested on my pi, and once a listing has been cached (the bbc end is slow), it took about 5 seconds for bbc_one listing. you can all stop complaining now ;-)
(2014-11-22, 08:59)exobuzz Wrote: [ -> ]SVN HEAD now has json support by default. I just tested on my pi, and once a listing has been cached (the bbc end is slow), it took about 5 seconds for bbc_one listing. you can all stop complaining now ;-)

This is great. Smile

Testing with r238, and apart from the occasional delay (which might be BBC related), the time taken for most lists is now back to "normal" (2-3 seconds) before displaying, and much of that time is due to the startup cost of the Python interpreter so difficult to reduce any further.

Processing the 337 entries for BBC One while entering "Bargain Hunt" now takes just over 1.5 seconds:

08:49:27 28555.277344 T:2658137152    INFO: plugin.video.iplayer: Read File: http://www.bbc.co.uk/iplayer/ion/listview/masterbrand/bbc_one/service_type/tv/block_type/episodes/format/json
08:49:27 28555.277344 T:2658137152    INFO: plugin.video.iplayer: File not in cache, requesting...
08:49:28 28555.503906 T:2658137152    INFO: plugin.video.iplayer: URL Fetch took 0.22 sec for http://www.bbc.co.uk/iplayer/ion/listview/masterbrand/bbc_one/service_type/tv/block_type/episodes/format/json
08:49:29 28557.072266 T:2658137152    INFO: plugin.video.iplayer: Found 337 entries

Not sure if the caching is working though, as it always fails to find anything in the cache ("File not in cache, requesting...") even if I repeatedly enter the same programme listing. Not complaining, just an observation. Great stuff. Smile
Thanks. Still needs some work, but I'll try and push out an update soon.
the rss cache is not saved to disk - it's just used to stop reparsing data multiple times if a feed is accessed twice in the same session - but the web response is cached to disk.

the main problem currently is this ion api is useless. It times out, and is horribly slow. Right now some of the API calls are not even returning data correctly (atoz only returns data for B it seems).

I have some alternative json data for tv data, but nothing yet to replace the functionality we have for the radio. Of course I have signed up for the nitro api, but will have to wait to see if/when they authenticate it (when it goes public I guess).

I think once the json stuff is working fully I will wait a bit, as I don't really want to spent days pulling in data from different sources for them to get closed off and have to start all over again. People wanting full radio 4 listing will have to be patient or nag them to fix the ion api (or provide an alternative). I may split up the channels into A-Z to work around the slow api, but even that isn't possible currently due to the buggy api.
On Android...Not 100% sure I'm on the test version. XBMC said it was enabled but the version number was the same. Live and catchup streams and search all perfect so far.
(2014-11-22, 08:59)exobuzz Wrote: [ -> ]you can all stop complaining now ;-)

I'm not complaining. I love you for getting this working again!

Still using 2.6.3 flawlessly. Wouldn't mind upgrading to have live tv but am now confused as to which release to use - speed is more important to me than radio feeds.
If you want to try the SVN builds, I've uploaded a zip to: http://www.nmacleod.com/public/iPlayer-svn.zip, since getting a zip out of Google Code is a pain in the arse (no offence, exobuzz Smile).

I've scheduled a job to run daily, at 9pm UK time, to push an update to the above named file, assuming there are any new svn commits.

In the zip there is a file called "milhouse-svn.log" that will provide details of the current revision for the zip. So if you want to test "nightlies", this is one source.

Edit: The scheduled job will now run on the hour, every hour so new builds will be available no more than an hour after the latest svn commit/check-in.
I have 2 xbmc machines in the house one is running 12.2 the other 10.1 (may 2011)
Ive just updated iplayer on both of them to version 2.66

Version 12.2 runs fine all but live radio. but the 10.1 just displays a script error.

Is there a problem with iplayer 2.66 running on xbmc 10.1 or do I need to look else where.

not really sure why it won run.

Any help advice would be appreciated,
you are still running xbmc 10 !?! that is ancient and unsupported. sorry. (I dropped support for python 2.4).
iPlayer 2.6.8 is available



* use json format for api output to speed up data parsing
* various code changes / cleanups
(2014-11-24, 19:29)exobuzz Wrote: [ -> ]you are still running xbmc 10 !?! that is ancient and unsupported. sorry. (I dropped support for python 2.4).

I know it old but it works, well... all but iplayer from a couple of weeks ago.

By the sounds its just my version of python doesn't support the newer scripts, hence the script errors.

Do you know if its possible to update python on this older version ? Would that work ?

Thanks for your advice
Upgrade! Scrapers are not even updated on that Smile
I cannot load over-arching categories like if I go to categories - Factual I get no programmes available within seconds. If I go to a sub category like Factual - Consumer I get programmes. Before when this happened I extended the socket timeout to 60 seconds and Factual would be slow to load, over half a minute, but it would load. Now nothing within a few seconds but the socket and stream timeouts are still at 60 seconds.

Any help please?
you are just going to have to put up with it i'm afraid. the api doesn't return programmes for all top level categories, such as factual.
a test build for people to try - want some testing before I push out a release if possible.

http://malus.exotica.org.uk/~buzz/iplayer-test.zip (or you can use a nightly build from milhouse)

the major change is I have introduced a self hosted channel cache. This is constructed by some server side code on a machine I own, and is generated from the slow ion api (and works around timeouts by grabbing letter by letter and combining - on a few channels even by letter it times out, so in those cases it grabs the last 14 days by date). The data is updated every 2 hours currently, but it means channel feeds should work a lot quicker, and feed that were broken like bbc world / radio 4 will now work again. Feeds like latest / popular use the live api.

There is a setting to disable this in the addon advanced settings, so if you don't want to connect to my machine to grab feeds and prefer up to date, but slower feeds via the live api, you can switch if off.