The branch, eden has been updated
       via  1fb39060f40129213ccacb4e6427e911f159eb3c (commit)
       via  4d62b466cec6de8b0df320882e33c845f4c605dc (commit)
      from  b482409121d0d2482300c9a8c7e11cd6ed7c84a7 (commit)

- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=1fb39060f40129213ccacb4e6427e911f159eb3c

commit 1fb39060f40129213ccacb4e6427e911f159eb3c
Author: beenje <[email protected]>
Date:   Sun Aug 11 20:41:25 2013 +0200

    [plugin.video.redbull_tv] updated to version 1.0.4

diff --git a/plugin.video.redbull_tv/addon.xml 
b/plugin.video.redbull_tv/addon.xml
index 0989d20..a4cbc66 100644
--- a/plugin.video.redbull_tv/addon.xml
+++ b/plugin.video.redbull_tv/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<addon id="plugin.video.redbull_tv" name="RedBull.tv" version="1.0.3" 
provider-name="AddonScriptorDE">
+<addon id="plugin.video.redbull_tv" name="RedBull.tv" version="1.0.4" 
provider-name="AddonScriptorDE">
     <requires>
         <import addon="xbmc.python" version="2.0"/>
         <import addon="script.module.pyamf" version="0.6.1"/>
@@ -13,6 +13,9 @@
         <language>en</language>
         <description lang="en">RedBullTV: Shows and live events</description>
         <disclaimer lang="en">Some parts of this addon may not be legal in 
your country of residence - please check with your local laws before 
installing.</disclaimer>
-    <platform>all</platform>
+        <website>http://www.redbull.tv</website>
+        
<source>https://github.com/AddonScriptorDE/plugin.video.redbull_tv</source>
+        <forum>http://forum.xbmc.org/showthread.php?tid=135532</forum>
+        <email>AddonScriptorDE at yahoo dot de</email>
     </extension>
 </addon>
diff --git a/plugin.video.redbull_tv/changelog.txt 
b/plugin.video.redbull_tv/changelog.txt
index 8cc96fb..bb55724 100644
--- a/plugin.video.redbull_tv/changelog.txt
+++ b/plugin.video.redbull_tv/changelog.txt
@@ -6,4 +6,7 @@
 - Added <disclaimer> tag to addon.xml
 - Added setting to force view mode
 1.0.3
-- Added live events
\ No newline at end of file
+- Added live events
+1.0.4
+- Fixed event playback
+- Added autoplay mode for events
diff --git a/plugin.video.redbull_tv/default.py 
b/plugin.video.redbull_tv/default.py
index 5d5e60a..5c063b1 100644
--- a/plugin.video.redbull_tv/default.py
+++ b/plugin.video.redbull_tv/default.py
@@ -1,286 +1,296 @@
 #!/usr/bin/python
 # -*- coding: utf-8 -*-
-import 
urllib,urllib2,re,xbmcplugin,xbmcgui,sys,xbmcaddon,base64,httplib,socket,time
+import urllib
+import urllib2
+import httplib
+import socket
+import sys
+import re
+import time
+import xbmcplugin
+import xbmcgui
+import xbmcaddon
 from pyamf import remoting
 
+socket.setdefaulttimeout(30)
 pluginhandle = int(sys.argv[1])
-xbox = xbmc.getCondVisibility("System.Platform.xbox")
-settings = xbmcaddon.Addon(id='plugin.video.redbull_tv')
-translation = settings.getLocalizedString
+addon = xbmcaddon.Addon(id='plugin.video.redbull_tv')
+translation = addon.getLocalizedString
+autoPlay = int(addon.getSetting("autoPlay"))
+forceViewMode = addon.getSetting("forceViewMode") == "true"
+viewMode = str(addon.getSetting("viewMode"))
+maxBitRate = addon.getSetting("maxBitRate")
+maxBitRate = [512000, 1024000, 2048000, 3072000, 4096000, 
5120000][int(maxBitRate)]
+mainUrlLive = "http://live.redbull.tv";
+mainUrl = "http://www.redbull.tv";
 
-maxBitRate=settings.getSetting("maxBitRate")
-forceViewMode=settings.getSetting("forceViewMode")
-if forceViewMode=="true":
-  forceViewMode=True
-else:
-  forceViewMode=False
-viewMode=str(settings.getSetting("viewMode"))
-
-qual=[512000,1024000,2048000,3072000,4096000,5120000]
-maxBitRate=qual[int(maxBitRate)]
 
 def index():
-        addDir(translation(30005),"live",'listEvents',"")
-        addDir(translation(30006),"latest",'listEvents',"")
-        
addDir(translation(30002),"http://www.redbull.tv/Redbulltv";,'latestVideos',"")
-        
addDir(translation(30003),"http://www.redbull.tv/cs/Satellite?_=1341624385783&pagename=RBWebTV%2FRBTV_P%2FRBWTVShowContainer&orderby=latest&p=%3C%25%3Dics.GetVar(%22p%22)%25%3E&start=1",'listShows',"")
-        addDir(translation(30004),"",'search',"")
-        xbmcplugin.endOfDirectory(pluginhandle)
-        if forceViewMode==True:
-          xbmc.executebuiltin('Container.SetViewMode('+viewMode+')')
+    addDir(translation(30005), "live", 'listEvents', "")
+    addDir(translation(30006), "latest", 'listEvents', "")
+    addDir(translation(30002), mainUrl+"/Redbulltv", 'latestVideos', "")
+    addDir(translation(30003), 
mainUrl+"/cs/Satellite?_=1341624385783&pagename=RBWebTV%2FRBTV_P%2FRBWTVShowContainer&orderby=latest&p=%3C%25%3Dics.GetVar(%22p%22)%25%3E&start=1",
 'listShows', "")
+    addDir(translation(30004), "", 'search', "")
+    xbmcplugin.endOfDirectory(pluginhandle)
+
 
 def listEvents(url):
-        matchPage=""
-        if url.find("http://";)==0:
-          content = getUrl(url)
-          matchPage=re.compile('<a 
href="/includes/fragments/schedule_list.php\\?pg=(.+?)" class="(.+?)">', 
re.DOTALL).findall(content)
-          spl=content.split('<td class="status"><span 
class="prev">Past</span></td>')
-        else:
-          content = 
getUrl("http://live.redbull.tv/includes/fragments/schedule_list.php?pg=1";)
-          if url=="live":
-            if content.find('<span class="live">Live</span>')>0:
-              match=re.compile('<td class="description">(.+?)</td>', 
re.DOTALL).findall(content)
-              desc=match[0]
-              match=re.compile('<a href="(.+?)">(.+?)<span>(.+?)</span>', 
re.DOTALL).findall(content)
-              url="http://live.redbull.tv"+match[0][0]
-              title=match[0][1]
-              subTitle=match[0][2]
-              title="NOW LIVE: "+title
-              title=cleanTitle(title)
-              addLink(title,url,'playEvent',"",subTitle+"\n"+desc)
-            spl=content.split('<td class="status"><span>Upcoming</span></td>')
-          elif url=="latest":
-            matchPage=re.compile('<a 
href="/includes/fragments/schedule_list.php\\?pg=(.+?)" class="(.+?)">', 
re.DOTALL).findall(content)
-            spl=content.split('<td class="status"><span 
class="prev">Past</span></td>')
-        for i in range(1,len(spl),1):
-            entry=spl[i]
-            match=re.compile('<span 
class="localtime-date-only-med">(.+?)</span>', re.DOTALL).findall(entry)
-            date=match[0]
-            spl2=date.split("-")
-            day=spl2[2]
-            month=spl2[1]
-            if len(day)==1:
-              day="0"+day
-            if len(month)==1:
-              month="0"+month
-            date=day+"."+month
-            match=re.compile('<span class="localtime-time-only">(.+?)</span>', 
re.DOTALL).findall(entry)
-            timeFrom=match[0]
-            spl2=timeFrom.split("-")
-            timeFrom=spl2[3]+":"+spl2[4]
-            if len(timeFrom)==4:
-              timeFrom="0"+timeFrom
-            match=re.compile('<span class="localtime-time-only 
tz-abbr">(.+?)</span>', re.DOTALL).findall(entry)
-            timeTo=match[0]
-            spl2=timeTo.split("-")
-            timeTo=spl2[3]+":"+spl2[4]
-            if len(timeTo)==4:
-              timeTo="0"+timeTo
-            match=re.compile('<td class="description">(.+?)</td>', 
re.DOTALL).findall(entry)
-            desc=match[0]
-            match=re.compile('<a href="(.+?)">(.+?)<span>(.+?)</span>', 
re.DOTALL).findall(entry)
-            url="http://live.redbull.tv"+match[0][0]
-            title=match[0][1]
-            subTitle=match[0][2]
-            title=date+" "+timeFrom+" (GMT) - "+title
-            title=cleanTitle(title)
-            addLink(title,url,'playEvent',"",date+" "+timeFrom+"-"+timeTo+" 
(GMT): "+subTitle+"\n"+desc)
-        if len(matchPage)>0:
-          for pageNr, title in matchPage:
-            if title=="next":
-              
addDir(translation(30001),"http://live.redbull.tv/includes/fragments/schedule_list.php?pg="+pageNr,'listEvents',"")
-        xbmcplugin.endOfDirectory(pluginhandle)
-        if forceViewMode==True:
-          xbmc.executebuiltin('Container.SetViewMode('+viewMode+')')
+    matchPage = ""
+    if url.startswith("http://";):
+        content = getUrl(url)
+        matchPage = re.compile('<a 
href="/includes/fragments/schedule_list.php\\?pg=(.+?)" class="(.+?)">', 
re.DOTALL).findall(content)
+        spl = content.split('<td class="status"><span 
class="prev">Past</span></td>')
+    else:
+        content = 
getUrl(mainUrlLive+"/includes/fragments/schedule_list.php?pg=1")
+        if url == "live":
+            if '<span class="live">Live</span>' in content:
+                match = re.compile('<td class="description">(.+?)</td>', 
re.DOTALL).findall(content)
+                desc = match[0]
+                match = re.compile('<a href="(.+?)">(.+?)<span>(.+?)</span>', 
re.DOTALL).findall(content)
+                url = mainUrlLive+match[0][0]
+                title = match[0][1]
+                subTitle = match[0][2]
+                title = "NOW LIVE: "+title
+                title = cleanTitle(title)
+                addLink(title, url, 'playEvent', "", subTitle+"\n"+desc)
+            spl = content.split('<td 
class="status"><span>Upcoming</span></td>')
+        elif url == "latest":
+            matchPage = re.compile('<a 
href="/includes/fragments/schedule_list.php\\?pg=(.+?)" class="(.+?)">', 
re.DOTALL).findall(content)
+            spl = content.split('<td class="status"><span 
class="prev">Past</span></td>')
+    for i in range(1, len(spl), 1):
+        entry = spl[i]
+        match = re.compile('<span 
class="localtime-date-only-med">(.+?)</span>', re.DOTALL).findall(entry)
+        date = match[0]
+        spl2 = date.split("-")
+        day = spl2[2]
+        month = spl2[1]
+        if len(day) == 1:
+            day = "0"+day
+        if len(month) == 1:
+            month = "0"+month
+        date = day+"."+month
+        match = re.compile('<span class="localtime-time-only">(.+?)</span>', 
re.DOTALL).findall(entry)
+        timeFrom = match[0]
+        spl2 = timeFrom.split("-")
+        timeFrom = spl2[3]+":"+spl2[4]
+        if len(timeFrom) == 4:
+            timeFrom = "0"+timeFrom
+        match = re.compile('<span class="localtime-time-only 
tz-abbr">(.+?)</span>', re.DOTALL).findall(entry)
+        timeTo = match[0]
+        spl2 = timeTo.split("-")
+        timeTo = spl2[3]+":"+spl2[4]
+        if len(timeTo) == 4:
+            timeTo = "0"+timeTo
+        match = re.compile('<td class="description">(.+?)</td>', 
re.DOTALL).findall(entry)
+        desc = match[0]
+        match = re.compile('<a href="(.+?)">(.+?)<span>(.+?)</span>', 
re.DOTALL).findall(entry)
+        url = mainUrlLive+match[0][0]
+        title = match[0][1]
+        subTitle = match[0][2]
+        title = date+" "+timeFrom+" (GMT) - "+title
+        title = cleanTitle(title)
+        addLink(title, url, 'playEvent', "", date+" "+timeFrom+"-"+timeTo+" 
(GMT): "+subTitle+"\n"+desc)
+    if matchPage:
+        for pageNr, title in matchPage:
+            if title == "next":
+                addDir(translation(30001), 
mainUrlLive+"/includes/fragments/schedule_list.php?pg="+pageNr, 'listEvents', 
"")
+    xbmcplugin.endOfDirectory(pluginhandle)
+    if forceViewMode:
+        xbmc.executebuiltin('Container.SetViewMode('+viewMode+')')
+
 
 def latestVideos(url):
-        content = getUrl(url)
-        content = content[content.find('<h3>LATEST EPISODES</h3>'):]
-        content = content[:content.find('</ul>')]
-        spl=content.split('<li')
-        for i in range(1,len(spl),1):
-            entry=spl[i]
-            match=re.compile('<span class="date">(.+?)</span>', 
re.DOTALL).findall(entry)
-            date=match[0]
-            match=re.compile('<span class="season">(.+?)</span>', 
re.DOTALL).findall(entry)
-            subTitle=match[0]
-            match=re.compile('<span class="title">(.+?)</span>', 
re.DOTALL).findall(entry)
-            title=date+" - "+match[0]+" - "+subTitle
-            title=cleanTitle(title)
-            match=re.compile('href="(.+?)"', re.DOTALL).findall(entry)
-            url="http://www.redbull.tv"+match[0]
-            match=re.compile('src="(.+?)"', re.DOTALL).findall(entry)
-            thumb="http://www.redbull.tv"+match[0].replace(" ","%20")
-            addLink(title,url,'playVideo',thumb)
-        xbmcplugin.endOfDirectory(pluginhandle)
-        if forceViewMode==True:
-          xbmc.executebuiltin('Container.SetViewMode('+viewMode+')')
+    content = getUrl(url)
+    content = content[content.find('<h3>LATEST EPISODES</h3>'):]
+    content = content[:content.find('</ul>')]
+    spl = content.split('<li')
+    for i in range(1, len(spl), 1):
+        entry = spl[i]
+        match = re.compile('<span class="date">(.+?)</span>', 
re.DOTALL).findall(entry)
+        date = match[0]
+        match = re.compile('<span class="season">(.+?)</span>', 
re.DOTALL).findall(entry)
+        subTitle = match[0]
+        match = re.compile('<span class="title">(.+?)</span>', 
re.DOTALL).findall(entry)
+        title = date+" - "+match[0]+" - "+subTitle
+        title = cleanTitle(title)
+        match = re.compile('href="(.+?)"', re.DOTALL).findall(entry)
+        url = mainUrl+match[0]
+        match = re.compile('src="(.+?)"', re.DOTALL).findall(entry)
+        thumb = mainUrl+match[0].replace(" ", "%20")
+        addLink(title, url, 'playVideo', thumb)
+    xbmcplugin.endOfDirectory(pluginhandle)
+    if forceViewMode:
+        xbmc.executebuiltin('Container.SetViewMode('+viewMode+')')
+
 
 def listShows(url):
-        urlMain = url
-        content = getUrl(url)
-        content = content[content.find('<div class="carousel-container"'):]
-        spl=content.split('<div data-id=')
-        for i in range(1,len(spl),1):
-            entry=spl[i]
-            match=re.compile('<span class="episode-count">(.+?)</span>', 
re.DOTALL).findall(entry)
-            subTitle=match[0]
-            match=re.compile('<span class="title">(.+?)</span>', 
re.DOTALL).findall(entry)
-            title=match[0].strip()+" 
("+subTitle.strip().replace("[","").replace("]","").replace(" episodes","")+")"
-            title=cleanTitle(title)
-            match=re.compile('href="(.+?)"', re.DOTALL).findall(entry)
-            url="http://www.redbull.tv"+match[0]
-            match=re.compile('src="(.+?)"', re.DOTALL).findall(entry)
-            thumb="http://www.redbull.tv"+match[0].replace(" ","%20")
-            addDir(title,url,'listVideos',thumb)
-        if 
urlMain=="http://www.redbull.tv/cs/Satellite?_=1341624385783&pagename=RBWebTV%2FRBTV_P%2FRBWTVShowContainer&orderby=latest&p=%3C%25%3Dics.GetVar(%22p%22)%25%3E&start=1":
-          
addDir(translation(30001),"http://www.redbull.tv/cs/Satellite?_=1341624260257&pagename=RBWebTV%2FRBTV_P%2FRBWTVShowContainer&orderby=latest&p=%3C%25%3Dics.GetVar(%22p%22)%25%3E&start=17",'listShows',"")
-        xbmcplugin.endOfDirectory(pluginhandle)
-        if forceViewMode==True:
-          xbmc.executebuiltin('Container.SetViewMode('+viewMode+')')
+    urlMain = url
+    content = getUrl(url)
+    content = content[content.find('<div class="carousel-container"'):]
+    spl = content.split('<div data-id=')
+    for i in range(1, len(spl), 1):
+        entry = spl[i]
+        match = re.compile('<span class="episode-count">(.+?)</span>', 
re.DOTALL).findall(entry)
+        subTitle = match[0]
+        match = re.compile('<span class="title">(.+?)</span>', 
re.DOTALL).findall(entry)
+        title = match[0].strip()+" ("+subTitle.strip().replace("[", 
"").replace("]", "").replace(" episodes", "")+")"
+        title = cleanTitle(title)
+        match = re.compile('href="(.+?)"', re.DOTALL).findall(entry)
+        url = mainUrl+match[0]
+        match = re.compile('src="(.+?)"', re.DOTALL).findall(entry)
+        thumb = mainUrl+match[0].replace(" ", "%20")
+        addDir(title, url, 'listVideos', thumb)
+    if urlMain == 
mainUrl+"/cs/Satellite?_=1341624385783&pagename=RBWebTV%2FRBTV_P%2FRBWTVShowContainer&orderby=latest&p=%3C%25%3Dics.GetVar(%22p%22)%25%3E&start=1":
+        addDir(translation(30001), 
mainUrl+"/cs/Satellite?_=1341624260257&pagename=RBWebTV%2FRBTV_P%2FRBWTVShowContainer&orderby=latest&p=%3C%25%3Dics.GetVar(%22p%22)%25%3E&start=17",
 'listShows', "")
+    xbmcplugin.endOfDirectory(pluginhandle)
+    if forceViewMode:
+        xbmc.executebuiltin('Container.SetViewMode('+viewMode+')')
+
 
 def listVideos(url):
-        xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_LABEL)
-        content = getUrl(url)
-        spl=content.split('<div id="season-')
-        for i in range(1,len(spl),1):
-          entry=spl[i]
-          season=entry[:entry.find('"')]
-          if len(season)==1:
-            season="0"+season
-          entry=entry[entry.find('<tbody>'):]
-          entry=entry[:entry.find('</tbody>')]
-          spl2=entry.split('<tr')
-          for i in range(1,len(spl2),1):
-            entry2=spl2[i]
-            match=re.compile('<td><a href="(.+?)">(.+?)</a></td>', 
re.DOTALL).findall(entry2)
-            url="http://www.redbull.tv"+match[0][0]
-            episode=match[0][1]
-            if len(episode)==1:
-              episode="0"+episode
-            title=match[1][1]
-            length=match[2][1]
-            if length.find("</a>")==-1:
-              length = " ("+length+" min)"
-            else:
-              length = ""
-            addLink("S"+season+"E"+episode+" - 
"+title+length,url,'playVideo',"")
-        xbmcplugin.endOfDirectory(pluginhandle)
-        if forceViewMode==True:
-          xbmc.executebuiltin('Container.SetViewMode('+viewMode+')')
+    xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_LABEL)
+    content = getUrl(url)
+    spl = content.split('<div id="season-')
+    for i in range(1, len(spl), 1):
+        entry = spl[i]
+        season = entry[:entry.find('"')]
+        if len(season) == 1:
+            season = "0"+season
+        entry = entry[entry.find('<tbody>'):]
+        entry = entry[:entry.find('</tbody>')]
+        spl2 = entry.split('<tr')
+        for i in range(1, len(spl2), 1):
+            entry2 = spl2[i]
+            match = re.compile('<td><a href="(.+?)">(.+?)</a></td>', 
re.DOTALL).findall(entry2)
+            url = mainUrl+match[0][0]
+            episode = match[0][1]
+            if len(episode) == 1:
+                episode = "0"+episode
+            title = match[1][1]
+            length = match[2][1]
+            if "</a>" in length:
+                length = ""
+            addLink("S"+season+"E"+episode+" - "+title, url, 'playVideo', "", 
"", length)
+    xbmcplugin.endOfDirectory(pluginhandle)
+    if forceViewMode:
+        xbmc.executebuiltin('Container.SetViewMode('+viewMode+')')
+
 
 def search():
-        keyboard = xbmc.Keyboard('', translation(30004))
-        keyboard.doModal()
-        if keyboard.isConfirmed() and keyboard.getText():
-          search_string = keyboard.getText().replace(" ","+")
-          content = 
getUrl('http://www.redbull.tv/cs/Satellite?_=1341632208902&pagename=RBWebTV%2FRBWTVSearchResult&q='+search_string)
-          if content.find("<!-- Episodes -->")>=0:
+    keyboard = xbmc.Keyboard('', translation(30004))
+    keyboard.doModal()
+    if keyboard.isConfirmed() and keyboard.getText():
+        search_string = keyboard.getText().replace(" ", "+")
+        content = 
getUrl(mainUrl+'/cs/Satellite?_=1341632208902&pagename=RBWebTV%2FRBWTVSearchResult&q='+search_string)
+        if "<!-- Episodes -->" in content:
             content = content[content.find('<!-- Episodes -->'):]
-            spl=content.split('<div class="results-item">')
-            for i in range(1,len(spl),1):
-                entry=spl[i]
-                match=re.compile('<span style="font-weight: 
bold;">(.+?)</span><br/>', re.DOTALL).findall(entry)
-                title=match[0]
-                title=cleanTitle(title)
-                match=re.compile('href="(.+?)"', re.DOTALL).findall(entry)
-                url="http://www.redbull.tv"+match[0]
-                addLink(title,url,'playVideo',"")
-          xbmcplugin.endOfDirectory(pluginhandle)
-          if forceViewMode==True:
-            xbmc.executebuiltin('Container.SetViewMode('+viewMode+')')
+            spl = content.split('<div class="results-item">')
+            for i in range(1, len(spl), 1):
+                entry = spl[i]
+                match = re.compile('<span style="font-weight: 
bold;">(.+?)</span><br/>', re.DOTALL).findall(entry)
+                title = match[0]
+                title = cleanTitle(title)
+                match = re.compile('href="(.+?)"', re.DOTALL).findall(entry)
+                url = mainUrl+match[0]
+                addLink(title, url, 'playVideo', "")
+        xbmcplugin.endOfDirectory(pluginhandle)
+
 
 def playVideo(url):
-        content = getUrl(url)
-        match=re.compile("episode_video_id = '(.+?)'", 
re.DOTALL).findall(content)
-        playBrightCoveStream(match[0])
+    content = getUrl(url)
+    match = re.compile("episode_video_id = '(.+?)'", 
re.DOTALL).findall(content)
+    playBrightCoveStream(match[0])
+
 
 def playEvent(url):
-        content = getUrl(url)
-        match=re.compile('<span class="player-id"><span 
class="(.+?)"></span></span>', re.DOTALL).findall(content)
-        if len(match)>0:
-          playBrightCoveStream(match[0])
+    content = getUrl(url)
+    match = re.compile('data-player-id="(.+?)"', re.DOTALL).findall(content)
+    if match:
+        playBrightCoveStream(match[0])
+        if autoPlay > 0:
+            xbmc.sleep(autoPlay*1000)
+            if xbmc.Player().isPlaying() == True and 
int(xbmc.Player().getTime()) == 0:
+                xbmc.Player().pause()
+    else:
+        match = re.compile('<span class="ts-utc">(.+?)</span>', 
re.DOTALL).findall(content)
+        if match:
+            
xbmc.executebuiltin('XBMC.Notification('+str(translation(30105))+':,'+time.strftime("%d.%m.%y
 %H:%M", time.localtime(int(match[0]))) + ' 
('+str(translation(30106))+'),5000)')
         else:
-          match=re.compile('<span class="ts-utc">(.+?)</span>', 
re.DOTALL).findall(content)
-          if len(match)>0:
-            
xbmc.executebuiltin('XBMC.Notification('+str(translation(30105))+':,'+time.strftime("%d.%m.%y
 %H:%M",time.localtime(int(match[0]))) +' ('+str(translation(30106))+'),5000)')
-          else:
             
xbmc.executebuiltin('XBMC.Notification(Info:,'+str(translation(30104))+'!,5000)')
-        
+
+
 def playBrightCoveStream(bc_videoID):
-        bc_playerID = 761157706001
-        bc_publisherID = 710858724001
-        bc_const = "cf760beae3fbdde270b76f2109537e13144e6fbd"
-        conn = httplib.HTTPConnection("c.brightcove.com")
-        envelope = remoting.Envelope(amfVersion=3)
-        envelope.bodies.append(("/1", 
remoting.Request(target="com.brightcove.player.runtime.PlayerMediaFacade.findMediaById",
 body=[bc_const, bc_playerID, bc_videoID, bc_publisherID], envelope=envelope)))
-        conn.request("POST", "/services/messagebroker/amf?playerId=" + 
str(bc_playerID), str(remoting.encode(envelope).read()), {'content-type': 
'application/x-amf'})
-        response = conn.getresponse().read()
-        response = remoting.decode(response).bodies[0][1].body
-        streamUrl = ""
-        for item in sorted(response['renditions'], key=lambda 
item:item['encodingRate'], reverse=False):
-          encRate = item['encodingRate']
-          if encRate < maxBitRate:
+    bc_playerID = 761157706001
+    bc_publisherID = 710858724001
+    bc_const = "cf760beae3fbdde270b76f2109537e13144e6fbd"
+    conn = httplib.HTTPConnection("c.brightcove.com")
+    envelope = remoting.Envelope(amfVersion=3)
+    envelope.bodies.append(("/1", 
remoting.Request(target="com.brightcove.player.runtime.PlayerMediaFacade.findMediaById",
 body=[bc_const, bc_playerID, bc_videoID, bc_publisherID], envelope=envelope)))
+    conn.request("POST", "/services/messagebroker/amf?playerId=" + 
str(bc_playerID), str(remoting.encode(envelope).read()), {'content-type': 
'application/x-amf'})
+    response = conn.getresponse().read()
+    response = remoting.decode(response).bodies[0][1].body
+    streamUrl = ""
+    for item in sorted(response['renditions'], key=lambda item: 
item['encodingRate'], reverse=False):
+        encRate = item['encodingRate']
+        if encRate < maxBitRate:
             streamUrl = item['defaultURL']
-        if streamUrl.find("http://";)==0:
-          listItem = 
xbmcgui.ListItem(path=streamUrl+"?videoId="+bc_videoID+"&lineUpId=&pubId="+str(bc_publisherID)+"&playerId="+str(bc_playerID)+"&affiliateId=&v=&fp=&r=&g=")
-        else:
-          url = streamUrl[0:streamUrl.find("&")]
-          playpath = streamUrl[streamUrl.find("&")+1:]
-          listItem = xbmcgui.ListItem(path=url+' playpath='+playpath)
-        xbmcplugin.setResolvedUrl(pluginhandle,True,listItem)
+    if streamUrl.find("http://";) == 0:
+        listItem = 
xbmcgui.ListItem(path=streamUrl+"?videoId="+bc_videoID+"&lineUpId=&pubId="+str(bc_publisherID)+"&playerId="+str(bc_playerID)+"&affiliateId=&v=&fp=&r=&g=")
+    else:
+        url = streamUrl[0:streamUrl.find("&")]
+        playpath = streamUrl[streamUrl.find("&")+1:]
+        listItem = xbmcgui.ListItem(path=url+' playpath='+playpath)
+    xbmcplugin.setResolvedUrl(pluginhandle, True, listItem)
+
 
 def cleanTitle(title):
-        
title=title.replace("&lt;","<").replace("&gt;",">").replace("&amp;","&").replace("&#039;","\\").replace("&quot;","\"").replace("&szlig;","ß").replace("&ndash;","-")
-        
title=title.replace("&Auml;","Ä").replace("&Uuml;","Ü").replace("&Ouml;","Ö").replace("&auml;","ä").replace("&uuml;","ü").replace("&ouml;","ö")
-        title=title.strip()
-        return title
+    title = title.replace("&lt;", "<").replace("&gt;", ">").replace("&amp;", 
"&").replace("&#039;", "\\").replace("&quot;", "\"").replace("&szlig;", 
"ß").replace("&ndash;", "-")
+    title = title.replace("&Auml;", "Ä").replace("&Uuml;", 
"Ü").replace("&Ouml;", "Ö").replace("&auml;", "ä").replace("&uuml;", 
"ü").replace("&ouml;", "ö")
+    title = title.strip()
+    return title
+
 
 def getUrl(url):
-        req = urllib2.Request(url)
-        req.add_header('User-Agent', 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) 
Gecko/20100101 Firefox/13.0')
-        if xbox==True:
-          socket.setdefaulttimeout(30)
-          response = urllib2.urlopen(req)
-        else:
-          response = urllib2.urlopen(req,timeout=30)
-        link=response.read()
-        response.close()
-        return link
+    req = urllib2.Request(url)
+    req.add_header('User-Agent', 'Mozilla/5.0 (Windows NT 6.1; rv:22.0) 
Gecko/20100101 Firefox/22.0')
+    response = urllib2.urlopen(req)
+    link = response.read()
+    response.close()
+    return link
+
 
 def parameters_string_to_dict(parameters):
-        ''' Convert parameters encoded in a URL to a dict. '''
-        paramDict = {}
-        if parameters:
-            paramPairs = parameters[1:].split("&")
-            for paramsPair in paramPairs:
-                paramSplits = paramsPair.split('=')
-                if (len(paramSplits)) == 2:
-                    paramDict[paramSplits[0]] = paramSplits[1]
-        return paramDict
+    paramDict = {}
+    if parameters:
+        paramPairs = parameters[1:].split("&")
+        for paramsPair in paramPairs:
+            paramSplits = paramsPair.split('=')
+            if (len(paramSplits)) == 2:
+                paramDict[paramSplits[0]] = paramSplits[1]
+    return paramDict
+
+
+def addLink(name, url, mode, iconimage, desc="", duration=""):
+    u = sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)
+    ok = True
+    liz = xbmcgui.ListItem(name, iconImage="DefaultVideo.png", 
thumbnailImage=iconimage)
+    liz.setInfo(type="Video", infoLabels={"Title": name, "Plot": desc, 
"Duration": duration})
+    liz.setProperty('IsPlayable', 'true')
+    ok = xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=u, 
listitem=liz)
+    return ok
+
 
-def addLink(name,url,mode,iconimage,desc=""):
-        u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)
-        ok=True
-        liz=xbmcgui.ListItem(name, iconImage="DefaultVideo.png", 
thumbnailImage=iconimage)
-        liz.setInfo( type="Video", infoLabels={ "Title": name , "Plot": desc } 
)
-        liz.setProperty('IsPlayable', 'true')
-        
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz)
-        return ok
+def addDir(name, url, mode, iconimage):
+    u = sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)
+    ok = True
+    liz = xbmcgui.ListItem(name, iconImage="DefaultFolder.png", 
thumbnailImage=iconimage)
+    liz.setInfo(type="Video", infoLabels={"Title": name})
+    ok = xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=u, 
listitem=liz, isFolder=True)
+    return ok
 
-def addDir(name,url,mode,iconimage):
-        u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)
-        ok=True
-        liz=xbmcgui.ListItem(name, iconImage="DefaultFolder.png", 
thumbnailImage=iconimage)
-        liz.setInfo( type="Video", infoLabels={ "Title": name } )
-        
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=True)
-        return ok
-         
-params=parameters_string_to_dict(sys.argv[2])
-mode=params.get('mode')
-url=params.get('url')
-if type(url)==type(str()):
-  url=urllib.unquote_plus(url)
+params = parameters_string_to_dict(sys.argv[2])
+mode = urllib.unquote_plus(params.get('mode', ''))
+url = urllib.unquote_plus(params.get('url', ''))
 
 if mode == 'listVideos':
     listVideos(url)
diff --git a/plugin.video.redbull_tv/resources/language/English/strings.xml 
b/plugin.video.redbull_tv/resources/language/English/strings.xml
index e9689a2..cec623a 100644
--- a/plugin.video.redbull_tv/resources/language/English/strings.xml
+++ b/plugin.video.redbull_tv/resources/language/English/strings.xml
@@ -12,4 +12,5 @@
   <string id="30104">Event not available</string>
   <string id="30105">Event starts</string>
   <string id="30106">Local Time</string>
+  <string id="30107">Autoplay (events) after ... seconds (0=OFF)</string>
 </strings>
diff --git a/plugin.video.redbull_tv/resources/language/German/strings.xml 
b/plugin.video.redbull_tv/resources/language/German/strings.xml
index 74ec183..ba503ba 100644
--- a/plugin.video.redbull_tv/resources/language/German/strings.xml
+++ b/plugin.video.redbull_tv/resources/language/German/strings.xml
@@ -9,4 +9,5 @@
   <string id="30104">Veranstaltung nicht verfuegbar</string>
   <string id="30105">Veranstaltung startet</string>
   <string id="30106">Lokalzeit</string>
+  <string id="30107">Autoplay (events) nach ... Sekunden (0=OFF)</string>
 </strings>
diff --git a/plugin.video.redbull_tv/resources/settings.xml 
b/plugin.video.redbull_tv/resources/settings.xml
index 2e5e663..f5791eb 100644
--- a/plugin.video.redbull_tv/resources/settings.xml
+++ b/plugin.video.redbull_tv/resources/settings.xml
@@ -1,4 +1,5 @@
 <settings>
+   <setting id="autoPlay" type="number" label="30107" default="5"/>
    <setting id="maxBitRate" type="enum" label="30101" 
values="500kb|1000kb|2000kb|3000kb|4000kb|5000kb" default="5"/>
    <setting id="forceViewMode" type="bool" label="30102" default="false"/>
    <setting id="viewMode" type="number" label="30103" default="500"/>

http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=4d62b466cec6de8b0df320882e33c845f4c605dc

commit 4d62b466cec6de8b0df320882e33c845f4c605dc
Author: beenje <[email protected]>
Date:   Sun Aug 11 20:41:01 2013 +0200

    [plugin.video.nascar] updated to version 1.0.3

diff --git a/plugin.video.nascar/addon.xml b/plugin.video.nascar/addon.xml
index a1a5e4b..ef6c8be 100644
--- a/plugin.video.nascar/addon.xml
+++ b/plugin.video.nascar/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="plugin.video.nascar"
        name="Nascar.com"
-       version="1.0.2"
+       version="1.0.3"
        provider-name="divingmule">
   <requires>
     <import addon="xbmc.python" version="2.0"/>
diff --git a/plugin.video.nascar/changelog.txt 
b/plugin.video.nascar/changelog.txt
index e88f1db..046a4ba 100644
--- a/plugin.video.nascar/changelog.txt
+++ b/plugin.video.nascar/changelog.txt
@@ -1,3 +1,6 @@
+Version 1.0.3
+fix website changes
+
 Version 1.0.2
 fix website changes
 
diff --git a/plugin.video.nascar/default.py b/plugin.video.nascar/default.py
index 0c0f334..10d4388 100644
--- a/plugin.video.nascar/default.py
+++ b/plugin.video.nascar/default.py
@@ -54,23 +54,16 @@ def get_video_items(url, featured=False):
                 items = soup.find('div', attrs={'class': 
"featuredVideos"})('article')
             else:
                 items = soup.find('div', attrs={'class': 
"articlesList"})('article')
+            addon_log('video_items: %s' %len(items))
             for i in items:
                 if featured:
-                    try:
-                        a_dict = 
eval(i.img['data-tracking-params'].replace('\r\n', ''))
-                        title = a_dict['eVar1']
-                    except:
-                        try:
-                            title = re.findall('"eVar1":"(.+?)\n",', 
str(i.img))[0].strip()
-                        except:
-                            print_exc
-                            pass
-                    item_id = 
i.img['data-ajax-post-data'].split('=')[1].split('&')[0]
+                    title = i('a')[1].string
+                    item_id = 
i.img['data-ajax-post-data'].split('&')[0].split('=')[1]
                     thumb = i.img['data-resp-url']
                 else:
                     title = i.img['alt']
-                    item_id = i.img['data-ajax-post-data'].split('=')[1]
-                    thumb = i.img['src']
+                    item_id = i.span['data-ajax-post-data'].split('=')[1]
+                    thumb = i.img['data-original']
                 
u=sys.argv[0]+'?mode=resolve_url&url='+urllib.quote_plus(item_id)
                 liz=xbmcgui.ListItem(title, iconImage="DefaultVideo.png", 
thumbnailImage=thumb)
                 liz.setInfo(type="Video", infoLabels={"Title": title})

-----------------------------------------------------------------------

Summary of changes:
 plugin.video.nascar/addon.xml                      |    2 +-
 plugin.video.nascar/changelog.txt                  |    3 +
 plugin.video.nascar/default.py                     |   17 +-
 plugin.video.redbull_tv/addon.xml                  |    7 +-
 plugin.video.redbull_tv/changelog.txt              |    5 +-
 plugin.video.redbull_tv/default.py                 |  506 ++++++++++----------
 .../resources/language/English/strings.xml         |    1 +
 .../resources/language/German/strings.xml          |    1 +
 plugin.video.redbull_tv/resources/settings.xml     |    1 +
 9 files changed, 279 insertions(+), 264 deletions(-)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to