The branch, dharma has been updated
via 49bd8ff0b6b8bc21841ff0135366d50cef241333 (commit)
from 9d9afe6c219a9619da5e8a1ee61be0a61fd465b2 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=49bd8ff0b6b8bc21841ff0135366d50cef241333
commit 49bd8ff0b6b8bc21841ff0135366d50cef241333
Author: beenje <[email protected]>
Date: Wed Jun 15 21:40:20 2011 +0200
[plugin.video.arretsurimages] updated to version 1.1.2
diff --git a/plugin.video.arretsurimages/addon.xml
b/plugin.video.arretsurimages/addon.xml
index 0567321..4658fff 100644
--- a/plugin.video.arretsurimages/addon.xml
+++ b/plugin.video.arretsurimages/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.arretsurimages"
name="Arrêt Sur Images"
- version="1.1.1"
+ version="1.1.2"
provider-name="beenje">
<requires>
<import addon="xbmc.python" version="1.0"/>
diff --git a/plugin.video.arretsurimages/changelog.txt
b/plugin.video.arretsurimages/changelog.txt
index 812bc3f..2cbb8e9 100644
--- a/plugin.video.arretsurimages/changelog.txt
+++ b/plugin.video.arretsurimages/changelog.txt
@@ -1,3 +1,9 @@
+[B]Version 1.1.2[/B]
+
+- Fixed broken video link (redirection to HTML5 video using iPad
+user-agent doesn't work anymore)
+- "Display all parts" setting disabled (full length video not available
anymore)
+
[B]Version 1.1.1[/B]
- If a stream is not available in the chosen quality, try another quality
diff --git a/plugin.video.arretsurimages/resources/lib/asi.py
b/plugin.video.arretsurimages/resources/lib/asi.py
index c84a3d9..8b51d34 100644
--- a/plugin.video.arretsurimages/resources/lib/asi.py
+++ b/plugin.video.arretsurimages/resources/lib/asi.py
@@ -186,7 +186,8 @@ class Main:
self.streams = deque(STREAMS)
# Order the streams depending on the quality chosen
self.streams.rotate(int(__addon__.getSetting('quality')) * -1)
- self.displayParts = (__addon__.getSetting('displayParts') == 'true')
+ # displayParts settings removed - force to True
+ self.displayParts = True
def downloadVideo(self, url):
if self.downloadMode == 'true':
diff --git a/plugin.video.arretsurimages/resources/lib/asi_scraper.py
b/plugin.video.arretsurimages/resources/lib/asi_scraper.py
index 868f9eb..c2aea25 100644
--- a/plugin.video.arretsurimages/resources/lib/asi_scraper.py
+++ b/plugin.video.arretsurimages/resources/lib/asi_scraper.py
@@ -100,63 +100,52 @@ class ArretSurImages:
return parts
def getVideoDetails(self, url, streams):
- """Return the video title and real link"""
- # Follow the swf link and get the video id from the answer
- # (this works due to the iPad user-agent)
- html = getHTML(url)
- match = re.search("DM_Widget_Video_PlayerV4Html5\('(\w*)',", html)
- if match:
- videoId = match.group(1)
- # Run the json request with the video id
- request = getHTML(JSONREQUEST % videoId)
- result = simplejson.loads(request)
- # The stream quality chosen might not be available
- # -> get the first video link available (following the streams
quality order)
- for stream in streams:
- if result[stream]:
- print "Found %s link" % stream
- link = result[stream]
- break
- else:
- print "No video link found parsing swf link answer"
- link = 'None'
- title = result["title"]
+ """Return the video title and link"""
+ # Run the json request using the video id
+ # passed in url argument
+ request = getHTML(JSONREQUEST % url)
+ result = simplejson.loads(request)
+ # The stream quality chosen might not be available
+ # -> get the first video link available (following the streams quality
order)
+ for stream in streams:
+ if result[stream]:
+ print "Found %s link" % stream
+ link = result[stream]
+ break
else:
- print "No video id found parsing swf link answer"
+ print "No video link found for this video id"
link = 'None'
- title = 'None'
+ title = result["title"]
return {'Title':title, 'url':link}
def getProgramParts(self, url, name, icon):
- """Return all parts of a program (swf links)
+ """Return all parts of a program (video id)
- swf links allow to get HTML5 links with iPad user-agent"""
+ video id allows to get video url with a json request"""
html = getHTML(url)
# Filter to avoid wrap-porte (La chronique porte) defined at the
beginning
# of the html page
blocContainers = SoupStrainer(attrs = {'class':'contenu-html
bg-page-contenu'})
soup = BeautifulSoup(html, parseOnlyThese = blocContainers)
parts = []
- part = 0
- # Get all movie links
+ part = 1
+ # Get all movie id
for param in soup.findAll('param', attrs = {'name':'movie'}):
- link = param["value"]
- if part == 0:
- # First link is the full video, just use the icon from
previous page
- title = name
+ try:
+ videoId = param.parent["id"]
+ except KeyError:
+ continue
+ title = name + ' - Acte %d' % part
+ # Try to get the icon linked to the iPhone video on that page
+ # That's faster than getting it from the json request (see
getVideoDetails),
+ # which would require one extra HTML request for each part
+ try:
+ media = param.parent.parent.find(text=re.compile(u'img src='))
+ match = re.search(u'img src="(.*?)"', media)
+ thumb = URLASI + match.group(1)
+ except (TypeError, AttributeError):
thumb = icon
- else:
- title = name + ' - Acte %d' % part
- # Try to get the icon linked to the iPhone video on that page
- # That's much faster than getting it from the json request
(see getVideoDetails),
- # which would require 2 extra HTML requests for each part
- try:
- media = param.parent.parent.find(text=re.compile(u'img
src='))
- match = re.search(u'img src="(.*?)"', media)
- thumb = URLASI + match.group(1)
- except (TypeError, AttributeError):
- thumb = icon
- parts.append({'url':link, 'Title':title, 'Thumb':thumb})
+ parts.append({'url':videoId, 'Title':title, 'Thumb':thumb})
part += 1
return parts
diff --git a/plugin.video.arretsurimages/resources/settings.xml
b/plugin.video.arretsurimages/resources/settings.xml
index a13c7b0..4b5d2bb 100644
--- a/plugin.video.arretsurimages/resources/settings.xml
+++ b/plugin.video.arretsurimages/resources/settings.xml
@@ -17,6 +17,5 @@
<!--Video-->
<category label="30100">
<setting id="quality" type="enum" label="30101" default="0"
lvalues="30102|30103" />
- <setting id="displayParts" type="bool" default="true" label="30105" />
</category>
</settings>
-----------------------------------------------------------------------
Summary of changes:
plugin.video.arretsurimages/addon.xml | 2 +-
plugin.video.arretsurimages/changelog.txt | 6 ++
plugin.video.arretsurimages/resources/lib/asi.py | 3 +-
.../resources/lib/asi_scraper.py | 75 ++++++++-----------
plugin.video.arretsurimages/resources/settings.xml | 1 -
5 files changed, 41 insertions(+), 46 deletions(-)
hooks/post-receive
--
Plugins
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons