2012-05-27, 18:20
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
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 )
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 )
(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.
(2012-05-28, 19:21)Mossy Wrote: @eagle_eye Homeland won't work in XBMC if it doesn't work in a browser.
. "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"
(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.