• 1
  • 13
  • 14
  • 15(current)
  • 16
  • 17
  • 21
[RELEASE] 4oD (Video) Addon - UK Channel 4 on demand
here is my log im not sure if ive done it correctly but im fairly new to this but am willing to try and help myself and others thanks again http://pastebin.com/EFa9BUu7
Seems to have been some case changes on the 4od webpage that lists the episodes, causing the parser to stall indefinitely when trying to list episodes.


Changing the following line in default.py:
Code:
epsInfo = re.findall( '<li.*?data-episode-number="(.*?)".*?data-assetid="(.*?)".*?data-episodeUrl="(.*?)".*?data-image-url="(.*?)".*?data-txDate="(.*?)".*?data-episodeTitle="(.*?)".*?data-episodeInfo="(.*?)".*?data-episodeSynopsis="(.*?)".*?data-series-number="(.*?)"', ol, re.DOTALL )

to

Code:
epsInfo = re.findall( '<li.*?data-episode-number="(.*?)".*?data-assetid="(.*?)".*?data-episodeurl="(.*?)".*?data-image-url="(.*?)".*?data-txdate="(.*?)".*?data-episodetitle="(.*?)".*?data-episodeinfo="(.*?)".*?data-episodesynopsis="(.*?)".*?data-series-number="(.*?)"', ol, re.DOTALL )

should get around the problem, and is backward compatible, so if they change the webpage back to the way it was, this code will still work.

Tested on Nibor's version 1.0.1.


Note: A better solution would do a quick check that the relevant strings can be found on the webpage, before trying to match the regexp. When the webpage changes like this we really just want an error msg saying that there's a problem.
People have been asking me for a Donate button, so if you want to buy me a drink > here it is <
Thanks Mossy that works great.

I'm using the alnicol version.

If you get a chance could you try and play an episode of Homeland and see what you get. I get the script error I posted a couple of pages back. Most programmes play ok. Homeland and a few others don't.

Cheers.
thanks for the help but im not really sure how to change the default py i have it but not sure wat to do as i cant seem to find the lines to change. is this a straight forward task or am i doing somthing wrong thanks again
i managed to change the default py but now im getting script error
@eagle_eye Homeland won't work in XBMC if it doesn't work in a browser.

@Dawson Be careful not to change the indentation, i.e. you need to preserve the whitespace to the left of "epsInfo...", so that there are the same number of spaces and/or tabs after you make the change.

If you have changed the spaces/tabs already then

1) Delete any spaces/tabs before "epsInfo..."
2) Copy the spaces/tabs at the start of the previous line, from the beginning of the line up to just before "ol = re.search..."
3) Paste at the very start of the "epsInfo..." line

When I'm getting a script error I can usually get around it by selecting the episode quickly twice. I still get the error message, but then the episode plays, though you may be getting the error for a different reason than me, so YMMV.

If there is some other problem then you need to post a debug XBMC log.
People have been asking me for a Donate button, so if you want to buy me a drink > here it is <
(2012-05-28, 13:12)Mossy Wrote: Seems to have been some case changes on the 4od webpage that lists the episodes, causing the parser to stall indefinitely when trying to list episodes.


Changing the following line in default.py:
Code:
epsInfo = re.findall( '<li.*?data-episode-number="(.*?)".*?data-assetid="(.*?)".*?data-episodeUrl="(.*?)".*?data-image-url="(.*?)".*?data-txDate="(.*?)".*?data-episodeTitle="(.*?)".*?data-episodeInfo="(.*?)".*?data-episodeSynopsis="(.*?)".*?data-series-number="(.*?)"', ol, re.DOTALL )

to

Code:
epsInfo = re.findall( '<li.*?data-episode-number="(.*?)".*?data-assetid="(.*?)".*?data-episodeurl="(.*?)".*?data-image-url="(.*?)".*?data-txdate="(.*?)".*?data-episodetitle="(.*?)".*?data-episodeinfo="(.*?)".*?data-episodesynopsis="(.*?)".*?data-series-number="(.*?)"', ol, re.DOTALL )

should get around the problem, and is backward compatible, so if they change the webpage back to the way it was, this code will still work.

Tested on Nibor's version 1.0.1.


Note: A better solution would do a quick check that the relevant strings can be found on the webpage, before trying to match the regexp. When the webpage changes like this we really just want an error msg saying that there's a problem.

Many thanks Mossy its working fine for me now

For anyone not comfortable editing the default.py I've put my edited 40d folder here in zip format:-
40d zip
(2012-05-28, 19:21)Mossy Wrote: @eagle_eye Homeland won't work in XBMC if it doesn't work in a browser.

Currently Homeland won't work in Firefox on Linux Mint. It gives a message about a Digital Rights error. That's understandable although previously the error was something like Access rights have expired. I watched most episodes in XBMC under Linux until about a month ago.

On Windows 7 on the same machine Homeland works fine in Firefox and Internet Explorer but not in XBMC with the same 4od plugin.

When I did some testing the only programmes to bomb out had 'violence' or 'strong language' warnings. However most programmes with these warnings did work ok in XBMC.

Thanks again for your help.

edit:

Uninstalled and reinstalled Flash on Linux and can now watch Homeland in Firefox. Still no joy in XBMC though.

The reinstallation of Flash was advice from Channel 4 which specifically mentioned people having problems viewing Homeland and some other US shows.





cheers stammie got rid of script error when launching plugin but now back to how it was it will let me select a catagorie eg.. docs drama etc but then wont let me choose a program just stays on retreived 0 items or crashes and then have to reboot ATV 2 here is my debug log if it can help anyone http://pastebin.com/zq2G6jRy
I've taken a look at the fixes in this thread and here's what I see:
nibor
njtaylor
alnicol
paddycarey

Code:
.               "11" server     Cache Dir
nibor           not fixed       T:
njtaylor        fixed           T:
alnicol         fixed           "special://home","addon_data", gPluginName,'cache'
paddycarey      not fixed       "special://masterprofile","cache"

These are my observations using the plug-in in Ubuntu. Your experiences may be different, particularly if you use a different OS.

When you select an episode the content will come via either the "ak" server or the "11" server. There was a problem in the original plugin that would cause an immediate "Script Error" if the content was coming from the "11" server. This was fixed in some of the versions of the plugin in this thread.


Cache Dir

The cache dir was originally a subfolder of "T:" which previously mapped to the userdata folder. That mapping no longer works and this probably caused problems for some, because the resulting path was invalid. For me it just created a folder called "T:" (with subdirectories). Newer mapping uses the Special protocol, which replaced "T:" with "special://masterprofile" or "special://profile". "masterprofile" is usually used for caching because in theory the cache can be shared between users, though I haven't looked at the how the caching mechanism in the plug-in works to see if this is the most appropriate mapping.


4od swf player version

The URL of 4od's swf player is specified in the plugin code, the player version number is part of the URL, and this version number changes periodically. Right now it seems that all versions redirect to a particular URL, which cannot be guessed just by looking at the webpage source. This works fine in a browser, but it causes a "301" redirect error in XBMC, though the video still plays. Unfortunately if a redirect occurs AND the "ak" server is being used then the video will only play for one or two minutes (returns to episode list). This does not happen if you resolve the URL redirection and use the resulting URL as the swf player URL.
People have been asking me for a Donate button, so if you want to buy me a drink > here it is <

plugin.video.4od version 1.0.2

Update: Can now be installed from this repository.
Download from here, and extract into your plugin.video.4od folder, though all you need is the default.py file.

If I have time I will add further bug fixes (when necessary), or copy them from contributors to this thread.


Change log
Version 1.02 (30 May 2012)

(njtaylor) Fixed episodes not playing via "11" server ("Script Error")

(alnicol) Fixed error preventing download action

(spoyser) Allow spaces in download path

Set cache folder to the originally intended folder: [XBMC]/userdata/addon_data/plugin.video.4od/cache

Problem: Changes in the episode listing webpage caused the plug-in to stall indefinitely
Fix 1: Update the plug-in to match the webpage changes
Fix 2: Change the way the listings are parsed so that future changes won't cause the plug-in to hang, even if the episodes won't play, or show in the listing.

Dynamically determine the URL of the 4od swf player from the webpage, resolving any URL redirect in the process. This should resolve the "plays for 1 or 2 minutes and then stops" problem.
People have been asking me for a Donate button, so if you want to buy me a drink > here it is <
@eagle_eye Homeland is streamed differently to most videos. Needs someone to figure out how to process it, see discussion here.
People have been asking me for a Donate button, so if you want to buy me a drink > here it is <
@Dawson Your debug log didn't give any details of what happens when you select a programme. I have create a version of default.py that logs information for each step during the episode listing process (if I read your post correctly you can see the programme listing within a category, but the problem happens when you select one of those programmes).

Try again with that version of default.py, post the new log and I'll take a look.
People have been asking me for a Donate button, so if you want to buy me a drink > here it is <
(2012-05-30, 17:08)Mossy Wrote:
plugin.video.4od version 1.0.2

Download from here, and extract into your plugin.video.4od folder, though all you need is the default.py file.

If I have time I will add further bug fixes (when necessary), or copy them from contributors to this thread.


Change log
Version 1.02 (30 May 2012)

(njtaylor) Fixed episodes not playing via "11" server ("Script Error")

(alnicol) Fixed error preventing download action

(spoyser) Allow spaces in download path

Set cache folder to the originally intended folder: [XBMC]/userdata/addon_data/plugin.video.4od/cache

Problem: Changes in the episode listing webpage caused the plug-in to stall indefinitely
Fix 1: Update the plug-in to match the webpage changes
Fix 2: Change the way the listings are parsed so that future changes won't cause the plug-in to hang, even if the episodes won't play, or show in the listing.

Dynamically determine the URL of the 4od swf player from the webpage, resolving any URL redirect in the process. This should resolve the "plays for 1 or 2 minutes and then stops" problem.

Thanks Mossy, your a star.Big Grin

Fantastic stuff Mossy. Well done.

Cheers.
  • 1
  • 13
  • 14
  • 15(current)
  • 16
  • 17
  • 21

Logout Mark Read Team Forum Stats Members Help
[RELEASE] 4oD (Video) Addon - UK Channel 4 on demand1