The branch, dharma has been updated
via d103e3d94c4de2f6765490e0de3cab32419f6f54 (commit)
from fbee232a17670e55fe39f8ba94d3df42cdf7329e (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=d103e3d94c4de2f6765490e0de3cab32419f6f54
commit d103e3d94c4de2f6765490e0de3cab32419f6f54
Author: spiff <[email protected]>
Date: Mon May 30 20:23:28 2011 +0200
[plugin.video.pbs] updated to version 1.0.4
diff --git a/plugin.video.pbs/addon.xml b/plugin.video.pbs/addon.xml
index 08f4e5b..1a77672 100644
--- a/plugin.video.pbs/addon.xml
+++ b/plugin.video.pbs/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.pbs"
name="PBS"
- version="1.0.3"
+ version="1.0.4"
provider-name="stacked">
<requires>
<import addon="xbmc.python" version="1.0"/>
diff --git a/plugin.video.pbs/changelog.txt b/plugin.video.pbs/changelog.txt
index c3887f3..0484c30 100644
--- a/plugin.video.pbs/changelog.txt
+++ b/plugin.video.pbs/changelog.txt
@@ -1,3 +1,9 @@
+[B]Version 1.0.4[/B]
+
+- Fixed script failed error when trying to play videos
+- Fixed errors when searching a term
+- Fixed error after HTTP 404 dialog
+
[B]Version 1.0.3[/B]
- Added duration to the video listings
diff --git a/plugin.video.pbs/default.py b/plugin.video.pbs/default.py
index 2b9fff1..2d444ee 100644
--- a/plugin.video.pbs/default.py
+++ b/plugin.video.pbs/default.py
@@ -6,8 +6,8 @@ import datetime
__plugin__ = "PBS"
__author__ = 'stacked <[email protected]>'
__url__ = 'http://code.google.com/p/plugin/'
-__date__ = '02-08-2011'
-__version__ = '1.0.3'
+__date__ = '04-25-2011'
+__version__ = '1.0.4'
__settings__ = xbmcaddon.Addon( id = 'plugin.video.pbs' )
programs_thumb = os.path.join( __settings__.getAddonInfo( 'path' ),
'resources', 'media', 'programs.png' )
@@ -17,6 +17,7 @@ search_thumb = os.path.join( __settings__.getAddonInfo(
'path' ), 'resources', '
next_thumb = os.path.join( __settings__.getAddonInfo( 'path' ), 'resources',
'media', 'next.png' )
def open_url( url ):
+ print 'PBS - URL: ' + url
retries = 0
while retries < 4:
try:
@@ -31,7 +32,7 @@ def open_url( url ):
dialog = xbmcgui.Dialog()
ok = dialog.ok( __plugin__ ,
__settings__.getLocalizedString( 30006 ) + '\n' +
__settings__.getLocalizedString( 30007 ) )
build_main_directory()
- return "data"
+ return "404"
retries += 1
print 'PBS - Retries: ' + str( retries )
continue
@@ -43,7 +44,7 @@ def open_url( url ):
return "data"
def clean( string ):
- list = [( '&', '&' ), ( '"', '"' ), ( ''', '\'' ), (
'\n',' ' ), ( '\r', ' '), ( '\t', ' '), ( '</p>', '' )]
+ list = [( '&', '&' ), ( '"', '"' ), ( ''', '\'' ), (
'\n',' ' ), ( '\r', ' '), ( '\t', ' '), ( '</p>', '' ), ( '<br />', ' ' )]
for search, replace in list:
string = string.replace( search, replace )
return string
@@ -134,7 +135,7 @@ def build_search_directory( url, page ):
build_search_keyboard()
return
programs_id_title = re.compile( '<a href="http://(.+?)/program/(.+?)"
class="program_title"><span class="program_name">(.+?)</span> <span
class="visit_program">Visit Program Page</span></a>' ).findall( data )
- programs_info = re.compile( '<div class="program_description">
<p>(.+?)</div>' ).findall( data )
+ programs_info = re.compile( '<div class="program_description">
<p>(.*?)\.<' ).findall( data )
video_count = re.compile( '<span class="resultnum">(.+?) Video
Results</span>' ).findall( data )[0]
id_title = re.compile( '<p class="info">(.*?)<a
href="http://video.pbs.org/video/(.+?)/(\?starttime=(.*?))?" class="title"
title="(.+?)">(.+?)</a>', re.DOTALL ).findall( video_data )
info = re.compile( '<span class="list">(.*?)</span>', re.DOTALL
).findall( video_data )
@@ -145,7 +146,7 @@ def build_search_directory( url, page ):
for url, id, title in programs_id_title:
url = 'http://' +url + '/program/' + id + '/rss/'
listitem = xbmcgui.ListItem( label = '[Program] ' +
clean( title ), iconImage = programs_thumb, thumbnailImage = programs_thumb )
- listitem.setInfo( type="Video", infoLabels={ "Title":
'Program: ' + clean( title ) , "Director": "PBS", "Studio": clean( title ),
"Plot": clean( programs_info[item_count] ) } )
+ listitem.setInfo( type="Video", infoLabels={ "Title":
'Program: ' + clean( title ) , "Director": "PBS", "Studio": clean( title ),
"Plot": clean( programs_info[item_count] + '.' ) } )
u = sys.argv[0] + "?mode=0&url=" + urllib.quote_plus(
url )
ok = xbmcplugin.addDirectoryItem( handle = int(
sys.argv[1] ), url = u, listitem = listitem, isFolder = True )
item_count += 1
@@ -185,6 +186,8 @@ def find_videos( url ):
def play_video( name, url, thumb, plot, studio, starttime ):
data = open_url( url )
+ if data == '404':
+ return
id = re.compile(
'http%3A//release.theplatform.com/content.select%3Fpid%3D(.+?)%26UserName'
).findall( data )[0]
url = 'http://release.theplatform.com/content.select?pid=' + id +
'&format=SMIL'
data = open_url( url )
@@ -192,11 +195,9 @@ def play_video( name, url, thumb, plot, studio, starttime
):
src = re.compile( '<ref src="(.+?)" title="(.+?)" author' ).findall(
data )[0][0]
if base == 'http://ad.doubleclick.net/adx/':
src_data = src.split( "<break>" )
- rtmp_url = src_data[0]
- playpath = "mp4:" + src_data[1]
+ rtmp_url = src_data[0] + "mp4:" + src_data[1]
else:
- rtmp_url = base + src
- playpath = src
+ rtmp_url = base + "mp4:" + src
item = xbmcgui.ListItem( label = name, iconImage = "DefaultVideo.png",
thumbnailImage = thumb )
item.setInfo( type="Video", infoLabels={ "Title": name , "Director":
"PBS", "Studio": "PBS: " + studio, "Plot": plot } )
xbmc.Player( xbmc.PLAYER_CORE_DVDPLAYER ).play( clean( rtmp_url ), item
)
@@ -268,6 +269,7 @@ except:
pass
if mode == None:
+ print __plugin__ + ' ' + __version__ + ' ' + __date__
build_main_directory()
elif mode == 0:
find_videos( url )
diff --git a/plugin.video.pbs/resources/language/English/strings.xml
b/plugin.video.pbs/resources/language/English/strings.xml
index f59009c..2c95b83 100644
--- a/plugin.video.pbs/resources/language/English/strings.xml
+++ b/plugin.video.pbs/resources/language/English/strings.xml
@@ -7,5 +7,5 @@
<string id="30004">No videos found. Please check your spelling,</string>
<string id="30005">or try again using different search words.</string>
<string id="30006">HTTP Error 404. Please report this problem
to</string>
- <string id="30007">[email protected]</string>
+ <string id="30007">[email protected] with a debug log.</string>
</strings>
-----------------------------------------------------------------------
Summary of changes:
plugin.video.pbs/addon.xml | 2 +-
plugin.video.pbs/changelog.txt | 6 +++++
plugin.video.pbs/default.py | 22 ++++++++++---------
.../resources/language/English/strings.xml | 2 +-
4 files changed, 20 insertions(+), 12 deletions(-)
hooks/post-receive
--
Plugins
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons