The branch, eden has been updated
       via  138625e16357d8e78d2481b6171130618d9f5665 (commit)
       via  b7ba0784411fd83bedea2f823f183e28de9c7290 (commit)
       via  27fe5bd4ace0349ead67c21b45ab0cbe330918aa (commit)
       via  ed6dc0babcc0a31e09c6757e9f9f265ff0e8f0b7 (commit)
       via  f382664e4ccbed566da80feb6f496fe4c3065701 (commit)
       via  efac9825b0d2d05d9755130df6f3b26bd6f86772 (commit)
      from  5bfb44cfd380f1b50795e34a365d148f002d28c7 (commit)

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


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


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

commit 27fe5bd4ace0349ead67c21b45ab0cbe330918aa
Author: spiff <[email protected]>
Date:   Wed Aug 15 22:49:37 2012 +0200

    [plugin.video.mpora_com] updated to version 1.0.4

diff --git a/plugin.video.mpora_com/addon.xml b/plugin.video.mpora_com/addon.xml
index cd11efe..a41eccb 100644
--- a/plugin.video.mpora_com/addon.xml
+++ b/plugin.video.mpora_com/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<addon id="plugin.video.mpora_com" name="Mpora.com" version="1.0.3" 
provider-name="AddonScriptorDE">
+<addon id="plugin.video.mpora_com" name="Mpora.com" version="1.0.4" 
provider-name="AddonScriptorDE">
     <requires>
         <import addon="xbmc.python" version="2.0"/>
     </requires>
diff --git a/plugin.video.mpora_com/changelog.txt 
b/plugin.video.mpora_com/changelog.txt
index 6762009..74e812b 100644
--- a/plugin.video.mpora_com/changelog.txt
+++ b/plugin.video.mpora_com/changelog.txt
@@ -6,4 +6,6 @@
 - Added setting to force view mode
 1.0.3
 - Fixed site changes for video playback
-- Added "Play all videos" mode
\ No newline at end of file
+- Added "Play all videos" mode
+1.0.4
+- Fixed site changes for video playback
\ No newline at end of file
diff --git a/plugin.video.mpora_com/default.py 
b/plugin.video.mpora_com/default.py
index b75eaf4..da53d88 100644
--- a/plugin.video.mpora_com/default.py
+++ b/plugin.video.mpora_com/default.py
@@ -2,12 +2,11 @@
 # -*- coding: utf-8 -*-
 import urllib,urllib2,re,xbmcplugin,xbmcgui,sys,xbmcaddon,base64,socket
 
+socket.setdefaulttimeout(30)
 pluginhandle = int(sys.argv[1])
-xbox = xbmc.getCondVisibility("System.Platform.xbox")
 settings = xbmcaddon.Addon(id='plugin.video.mpora_com')
 translation = settings.getLocalizedString
 
-maxVideoQuality=settings.getSetting("maxVideoQuality")
 forceViewMode=settings.getSetting("forceViewMode")
 if forceViewMode=="true":
   forceViewMode=True
@@ -15,6 +14,7 @@ else:
   forceViewMode=False
 viewMode=str(settings.getSetting("viewMode"))
 
+maxVideoQuality=settings.getSetting("maxVideoQuality")
 qual=["720p","540p"]
 maxVideoQuality=qual[int(maxVideoQuality)]
 
@@ -51,7 +51,6 @@ def sortDirection(url):
           xbmc.executebuiltin('Container.SetViewMode('+viewMode+')')
 
 def listVideos(url):
-        addLink(translation(30021),url,'playAll',"")
         content = getUrl(url)
         matchPage=re.compile('<a class="next_page" rel="next" href="(.+?)">', 
re.DOTALL).findall(content)
         content = content[content.find('<ul class="video-list">'):]
@@ -74,31 +73,6 @@ def listVideos(url):
         if forceViewMode==True:
           xbmc.executebuiltin('Container.SetViewMode('+viewMode+')')
 
-def playAll(url):
-        content = getUrl(url)
-        matchPage=re.compile('<a class="next_page" rel="next" href="(.+?)">', 
re.DOTALL).findall(content)
-        content = content[content.find('<ul class="video-list">'):]
-        content = content[:content.find('</ul>')]
-        spl=content.split('<li')
-        playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
-        playlist.clear()
-        i=1
-        for i in range(1,len(spl),1):
-            entry=spl[i]
-            match=re.compile('<h6>(.+?)</h6>', re.DOTALL).findall(entry)
-            title=match[0]
-            title=cleanTitle(title)
-            match=re.compile('href="(.+?)"', re.DOTALL).findall(entry)
-            url="http://mpora.com"+match[0]
-            if xbox==True:
-              
url="plugin://video/Mpora.com/?url="+urllib.quote_plus(url)+"&mode=playVideo"
-            else:
-              
url="plugin://plugin.video.mpora_com/?url="+urllib.quote_plus(url)+"&mode=playVideo"
-            listitem = xbmcgui.ListItem(title)
-            i=i+1
-            playlist.add(url,listitem)
-        xbmc.executebuiltin('XBMC.Playlist.PlayOffset(-1)')
-
 def search():
         keyboard = xbmc.Keyboard('', translation(30020))
         keyboard.doModal()
@@ -108,13 +82,16 @@ def search():
 
 def playVideo(url):
         content = getUrl(url)
-        matchSD=re.compile('"sd":{"src":"(.+?)"', re.DOTALL).findall(content)
-        matchHD=re.compile('"hd":{"src":"(.+?)"', re.DOTALL).findall(content)
-        url=matchSD[0]
-        if maxVideoQuality=="720p" and len(matchHD)>0:
-          url=matchHD[0]
-        listitem = xbmcgui.ListItem(path=url)
-        return xbmcplugin.setResolvedUrl(pluginhandle, True, listitem)
+        
matchSD=re.compile('"sd":{"sources":\\[{"type":"video/mp4","src":"(.+?)"}', 
re.DOTALL).findall(content)
+        
matchHD=re.compile('"hd":{"sources":\\[{"type":"video/mp4","src":"(.+?)"}', 
re.DOTALL).findall(content)
+        finalUrl=""
+        if len(matchSD)>0:
+          finalUrl=matchSD[0]
+          if maxVideoQuality=="720p" and len(matchHD)>0:
+            finalUrl=matchHD[0]
+        if finalUrl!="":
+          listitem = xbmcgui.ListItem(path=finalUrl)
+          return xbmcplugin.setResolvedUrl(pluginhandle, True, listitem)
 
 def cleanTitle(title):
         
title=title.replace("&lt;","<").replace("&gt;",">").replace("&amp;","&").replace("&#039;","\\").replace("&quot;","\"").replace("&szlig;","ß").replace("&ndash;","-")
@@ -124,12 +101,8 @@ def cleanTitle(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)
+        req.add_header('User-Agent', 'Mozilla/5.0 (Windows NT 6.1; rv:14.0) 
Gecko/20100101 Firefox/14.0.1')
+        response = urllib2.urlopen(req)
         link=response.read()
         response.close()
         return link
diff --git a/plugin.video.mpora_com/resources/language/English/strings.xml 
b/plugin.video.mpora_com/resources/language/English/strings.xml
index 3a587a6..8f00a87 100644
--- a/plugin.video.mpora_com/resources/language/English/strings.xml
+++ b/plugin.video.mpora_com/resources/language/English/strings.xml
@@ -22,6 +22,6 @@
   <string id="30020">Search</string>
   <string id="30021">Play all videos</string>
   <string id="30101">Maximum video quality</string>
-  <string id="30102">Force ViewMode</string>
-  <string id="30103">ViewMode</string>
+  <string id="30102">Force View</string>
+  <string id="30103">ViewID</string>
 </strings>
diff --git a/plugin.video.mpora_com/resources/language/German/strings.xml 
b/plugin.video.mpora_com/resources/language/German/strings.xml
index 338a104..51ae441 100644
--- a/plugin.video.mpora_com/resources/language/German/strings.xml
+++ b/plugin.video.mpora_com/resources/language/German/strings.xml
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <strings>
   <string id="30001">Nächste Seite</string>
-  <string id="30020">Suche</string>
+  <string id="30020">Suchen</string>
   <string id="30021">Alle Videos abspielen</string>
   <string id="30101">Maximale Videoqualität</string>
-  <string id="30102">ViewMode erzwingen</string>
+  <string id="30102">View erzwingen</string>
 </strings>

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


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

commit f382664e4ccbed566da80feb6f496fe4c3065701
Author: spiff <[email protected]>
Date:   Wed Aug 15 22:39:26 2012 +0200

    [plugin.video.cbsnews_com] updated to version 1.0.4

diff --git a/plugin.video.cbsnews_com/addon.xml 
b/plugin.video.cbsnews_com/addon.xml
index 85905be..f65ae07 100644
--- a/plugin.video.cbsnews_com/addon.xml
+++ b/plugin.video.cbsnews_com/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<addon id="plugin.video.cbsnews_com" name="CBSnews.com" version="1.0.2" 
provider-name="AddonScriptorDE">
+<addon id="plugin.video.cbsnews_com" name="CBSnews.com" version="1.0.4" 
provider-name="AddonScriptorDE">
     <requires>
         <import addon="xbmc.python" version="2.0"/>
     </requires>
diff --git a/plugin.video.cbsnews_com/changelog.txt 
b/plugin.video.cbsnews_com/changelog.txt
index 29d246b..7bcc77c 100644
--- a/plugin.video.cbsnews_com/changelog.txt
+++ b/plugin.video.cbsnews_com/changelog.txt
@@ -3,4 +3,8 @@
 1.0.1
 - Fixed small bug
 1.0.2
-- Added some shows
\ No newline at end of file
+- Added some shows
+1.0.3
+- Fixed playback for older videos
+1.0.4
+- Added setting for maximum bitrate
\ No newline at end of file
diff --git a/plugin.video.cbsnews_com/default.py 
b/plugin.video.cbsnews_com/default.py
index 2bfb5f7..6a924a8 100644
--- a/plugin.video.cbsnews_com/default.py
+++ b/plugin.video.cbsnews_com/default.py
@@ -2,8 +2,8 @@
 # -*- coding: utf-8 -*-
 import 
urllib,urllib2,re,xbmcplugin,xbmcgui,sys,xbmcaddon,base64,httplib,socket,time
 
+socket.setdefaulttimeout(30)
 pluginhandle = int(sys.argv[1])
-xbox = xbmc.getCondVisibility("System.Platform.xbox")
 settings = xbmcaddon.Addon(id='plugin.video.cbsnews_com')
 translation = settings.getLocalizedString
 
@@ -14,6 +14,10 @@ else:
   forceViewMode=False
 viewMode=str(settings.getSetting("viewMode"))
 
+maxBitRate=settings.getSetting("maxBitRate")
+qual=[500,1000,1500,2000,3000]
+maxBitRate=qual[int(maxBitRate)]
+
 def index():
         content = getUrl("http://www.cbsnews.com/video/";)
         spl=content.split('<li><h2><a href=')
@@ -174,20 +178,22 @@ def playVideo(url):
           id=match[0]
         elif len(match2)>0:
           id=match2[0]
-        content = 
getUrl("http://api.cnet.com/rest/v1.0/video?videoId="+id+"&iod=images,videoMedia,relatedLink,breadcrumb,relatedAssets,broadcast,lowcache&partTag=cntv";)
+        content = 
getUrl("http://api.cnet.com/rest/v1.0/video?videoId="+id+"&iod=videoMedia&players=Download,Streaming";)
         spl=content.split('<VideoMedia id=')
-        maxBitrate=0
+        maxBitrateTemp=0
+        finalUrl=""
         for i in range(1,len(spl),1):
             entry=spl[i]
-            if entry.find("<Player>Streaming</Player>")>=0:
+            if entry.find("<DeliveryUrl>")>=0:
               match=re.compile('<BitRate>(.+?)</BitRate>', 
re.DOTALL).findall(entry)
               bitrate=int(match[0])
-              if bitrate>maxBitrate:
-                maxBitrate=bitrate
+              if bitrate>maxBitrateTemp and bitrate<=maxBitRate:
+                maxBitrateTemp=bitrate
                 
match=re.compile('DeliveryUrl><!\\[CDATA\\[(.+?)\\]\\]></DeliveryUrl>', 
re.DOTALL).findall(entry)
                 finalUrl=match[0]
-        listitem = xbmcgui.ListItem(path=finalUrl)
-        return xbmcplugin.setResolvedUrl(pluginhandle, True, listitem)
+        if finalUrl!="":
+          listitem = xbmcgui.ListItem(path=finalUrl)
+          xbmcplugin.setResolvedUrl(pluginhandle, True, listitem)
 
 def cleanTitle(title):
         
title=title.replace("&lt;","<").replace("&gt;",">").replace("&amp;","&").replace("&#039;","'").replace("&quot;","\"").replace("&szlig;","ß").replace("&ndash;","-")
@@ -197,12 +203,8 @@ def cleanTitle(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)
+        req.add_header('User-Agent', 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) 
Gecko/20100101 Firefox/14.0')
+        response = urllib2.urlopen(req)
         link=response.read()
         response.close()
         return link
diff --git a/plugin.video.cbsnews_com/resources/language/English/strings.xml 
b/plugin.video.cbsnews_com/resources/language/English/strings.xml
index 730d7c8..d0faf90 100644
--- a/plugin.video.cbsnews_com/resources/language/English/strings.xml
+++ b/plugin.video.cbsnews_com/resources/language/English/strings.xml
@@ -3,6 +3,7 @@
   <string id="30001">Next Page</string>
   <string id="30002">Search</string>
   <string id="30003">All Videos</string>
-  <string id="30102">Force ViewMode</string>
-  <string id="30103">ViewMode</string>
+  <string id="30101">Maximum Bitrate</string>
+  <string id="30102">Force View</string>
+  <string id="30103">ViewID</string>
 </strings>
diff --git a/plugin.video.cbsnews_com/resources/language/German/strings.xml 
b/plugin.video.cbsnews_com/resources/language/German/strings.xml
index eaad2d2..b054bed 100644
--- a/plugin.video.cbsnews_com/resources/language/German/strings.xml
+++ b/plugin.video.cbsnews_com/resources/language/German/strings.xml
@@ -4,5 +4,5 @@
   <string id="30002">Suchen</string>
   <string id="30003">Alle Videos</string>
   <string id="30101">Maximale Bitrate</string>
-  <string id="30102">ViewMode erzwingen</string>
+  <string id="30102">View erzwingen</string>
 </strings>
diff --git a/plugin.video.cbsnews_com/resources/settings.xml 
b/plugin.video.cbsnews_com/resources/settings.xml
index c826fa0..9a1ff6f 100644
--- a/plugin.video.cbsnews_com/resources/settings.xml
+++ b/plugin.video.cbsnews_com/resources/settings.xml
@@ -1,4 +1,5 @@
 <settings>
+   <setting id="maxBitRate" type="enum" label="30101" 
values="500kb|1000kb|1500kb|2000kb|3000kb" default="4"/>
    <setting id="forceViewMode" type="bool" label="30102" default="false"/>
    <setting id="viewMode" type="number" label="30103" default="500"/>
 </settings>

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

commit efac9825b0d2d05d9755130df6f3b26bd6f86772
Author: spiff <[email protected]>
Date:   Wed Aug 15 22:33:02 2012 +0200

    [plugin.video.bestofyoutube_com] updated to version 1.0.6

diff --git a/plugin.video.bestofyoutube_com/addon.xml 
b/plugin.video.bestofyoutube_com/addon.xml
index 2a4d1d2..9217183 100644
--- a/plugin.video.bestofyoutube_com/addon.xml
+++ b/plugin.video.bestofyoutube_com/addon.xml
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<addon id="plugin.video.bestofyoutube_com" name="BestOfYoutube.com" 
version="1.0.5" provider-name="AddonScriptorDE">
+<addon id="plugin.video.bestofyoutube_com" name="BestOfYoutube.com" 
version="1.0.6" provider-name="AddonScriptorDE">
     <requires>
         <import addon="xbmc.python" version="2.0"/>
-        <import addon="plugin.video.youtube" version="2.9.1"/>
+        <import addon="plugin.video.youtube" version="3.0.0"/>
     </requires>
     <extension point="xbmc.python.pluginsource" library="default.py">
         <provides>video</provides>
diff --git a/plugin.video.bestofyoutube_com/changelog.txt 
b/plugin.video.bestofyoutube_com/changelog.txt
index 188dcb2..16048d8 100644
--- a/plugin.video.bestofyoutube_com/changelog.txt
+++ b/plugin.video.bestofyoutube_com/changelog.txt
@@ -1,6 +1,14 @@
-1.0.0 - First Try
-1.0.1 - Changed addon.xml
-1.0.2 - Added string localization
-1.0.3 - Changed Timeout
-1.0.4 - Various fixes and optical optimizations
-1.0.5 - Added Random Videos & Search
\ No newline at end of file
+1.0.0
+- First Try
+1.0.1
+- Changed addon.xml
+1.0.2
+- Added string localization
+1.0.3
+- Changed Timeout
+1.0.4
+- Various fixes and optical optimizations
+1.0.5
+- Added Random Videos & Search
+1.0.6
+- Fixed site changes for latest videos
\ No newline at end of file
diff --git a/plugin.video.bestofyoutube_com/default.py 
b/plugin.video.bestofyoutube_com/default.py
index 9100333..c0cec7f 100644
--- a/plugin.video.bestofyoutube_com/default.py
+++ b/plugin.video.bestofyoutube_com/default.py
@@ -1,71 +1,74 @@
 #!/usr/bin/python
 # -*- coding: utf-8 -*-
-import xbmcaddon
-import xbmcplugin
-import xbmcgui
-import sys
-import urllib, urllib2
-import re
+import xbmcaddon,xbmcplugin,xbmcgui,sys,urllib,urllib2,re,socket
 
-thisPlugin = int(sys.argv[1])
+socket.setdefaulttimeout(30)
+pluginhandle = int(sys.argv[1])
+xbox = xbmc.getCondVisibility("System.Platform.xbox")
+addon = xbmcaddon.Addon(id='plugin.video.bestofyoutube_com')
+translation = addon.getLocalizedString
 
-settings = xbmcaddon.Addon(id='plugin.video.bestofyoutube_com')
-translation = settings.getLocalizedString
-
-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
+forceViewMode=addon.getSetting("forceViewMode")
+if forceViewMode=="true":
+  forceViewMode=True
+else:
+  forceViewMode=False
+viewMode=str(addon.getSetting("viewMode"))
 
 def index():
-        addDir(translation(30001),"NEW",1,"")
-        
addDir(translation(30002),"http://www.bestofyoutube.com/index.php?show=week",3,"";)
-        
addDir(translation(30003),"http://www.bestofyoutube.com/index.php?show=month",3,"";)
-        
addDir(translation(30004),"http://www.bestofyoutube.com/index.php?show=year",3,"";)
-        
addDir(translation(30005),"http://www.bestofyoutube.com/index.php?show=alltime",3,"";)
-        
addDir(translation(30006),"http://www.bestofyoutube.com/index.php?show=random",3,"";)
-        addDir(translation(30007),"SEARCH",4,"")
-        xbmcplugin.endOfDirectory(thisPlugin)
-
-def showContentLatest():
-        content = getUrl("http://feeds.feedburner.com/bestofyoutubedotcom";)
-        match=re.compile('<item><title>(.+?)</title><description>(.+?)a 
href="(.+?)"(.+?)img src="(.+?)"', re.DOTALL).findall(content)
-        for title,desc,url,temp,thumb in match:
-                title=cleanTitle(title)
-                addLink(title,url,2,thumb)
-        xbmcplugin.endOfDirectory(thisPlugin)
+        
addDir(translation(30001),"http://www.bestofyoutube.com","listVideos","";)
+        addDir(translation(30008),"","bestOf","")
+        
addDir(translation(30006),"http://www.bestofyoutube.com/index.php?show=random","listVideos","";)
+        addDir(translation(30007),"","search","")
+        xbmcplugin.endOfDirectory(pluginhandle)
+        if forceViewMode==True:
+          xbmc.executebuiltin('Container.SetViewMode('+viewMode+')')
+
+def bestOf():
+        
addDir(translation(30002),"http://www.bestofyoutube.com/index.php?show=week","listVideos","";)
+        
addDir(translation(30003),"http://www.bestofyoutube.com/index.php?show=month","listVideos","";)
+        
addDir(translation(30004),"http://www.bestofyoutube.com/index.php?show=year","listVideos","";)
+        
addDir(translation(30005),"http://www.bestofyoutube.com/index.php?show=alltime","listVideos","";)
+        xbmcplugin.endOfDirectory(pluginhandle)
+        if forceViewMode==True:
+          xbmc.executebuiltin('Container.SetViewMode('+viewMode+')')
 
 def search():
-        keyboard = xbmc.Keyboard('', str(translation(30007)))
+        keyboard = xbmc.Keyboard('', translation(30007))
         keyboard.doModal()
         if keyboard.isConfirmed() and keyboard.getText():
           search_string = keyboard.getText().replace(" ","+")
-          
showContent("http://www.bestofyoutube.com/search.php?q="+search_string)
+          
listVideos("http://www.bestofyoutube.com/search.php?q="+search_string)
 
-def playVideo(url):
-        if url.find("http://";)==0:
-          content = getUrl(url)
-          match=re.compile('<param name="movie" 
value="http://www.youtube.com/v/(.+?)&amp;', re.DOTALL).findall(content)
-          youtubeID=match[0]
+def playVideo(id):
+        if xbox==True:
+          url = 
"plugin://video/YouTube/?path=/root/video&action=play_video&videoid=" + id
         else:
-          youtubeID=url
-        fullData = 
"plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid=" + 
youtubeID
-        listitem = xbmcgui.ListItem(path=fullData)
-        return xbmcplugin.setResolvedUrl(thisPlugin, True, listitem)
+          url = 
"plugin://plugin.video.youtube/?path=/root/video&action=play_video&videoid=" + 
id
+        listitem = xbmcgui.ListItem(path=url)
+        return xbmcplugin.setResolvedUrl(pluginhandle, True, listitem)
 
-def showContent(url):
+def listVideos(url):
         content = getUrl(url)
-        spl=content.split("<div class='videoarea'>")
+        spl=content.split("<div class='main'>")
         for i in range(1,len(spl),1):
             entry=spl[i]
             match=re.compile('value="http://www.youtube.com/v/(.+?)&amp;', 
re.DOTALL).findall(entry)
-            url=match[0]
-            thumb="http://img.youtube.com/vi/"+url+"/0.jpg";
+            id=match[0]
+            match=re.compile("name='up'>(.+?)<", re.DOTALL).findall(entry)
+            up=float(match[0])
+            match=re.compile("name='down'>(.+?)<", re.DOTALL).findall(entry)
+            down=float(match[0])
+            thumb="http://img.youtube.com/vi/"+id+"/0.jpg";
             match=re.compile("<div class='title'><a href='/(.+?)'>(.+?)</a>", 
re.DOTALL).findall(entry)
             title=match[0][1]
             title=cleanTitle(title)
-            addLink(title,url,2,thumb)
+            if (up+down)>0:
+              percentage=int((up/(up+down))*100)
+            else:
+              percentage=100
+            title=title+" ("+str(percentage)+"%)"
+            addLink(title,id,"playVideo",thumb)
         content=content[content.find('<div class="pagination">'):]
         content=content[:content.find('</div>')]
         spl=content.split("<a href=\"")
@@ -73,16 +76,24 @@ def showContent(url):
           entry=spl[i][:spl[i].find('</a>')]
           url="http://www.bestofyoutube.com/"+entry[:entry.find('"')]
           if entry.find('next &#187;')>=0:
-            addDir("Next Page",url,3,'')
-        xbmcplugin.endOfDirectory(thisPlugin)
+            addDir(translation(30009),url,"listVideos",'')
+        xbmcplugin.endOfDirectory(pluginhandle)
+        if forceViewMode==True:
+          xbmc.executebuiltin('Container.SetViewMode('+viewMode+')')
 
 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/11.0')
-    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:14.0) 
Gecko/20100101 Firefox/14.0')
+        response = urllib2.urlopen(req)
+        link=response.read()
+        response.close()
+        return link
+
+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
 
 def addLink(name,url,mode,iconimage):
         u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)
@@ -112,28 +123,19 @@ def parameters_string_to_dict(parameters):
                 paramDict[paramSplits[0]] = paramSplits[1]
     return paramDict
 
-params = parameters_string_to_dict(sys.argv[2])
-url=None
-mode=None
-
-try:
-        url=urllib.unquote_plus(params["url"])
-except:
-        pass
-try:
-        mode=int(params["mode"])
-except:
-        pass
-
-
-if mode==None or url==None or len(url)<1:
-        index()
-       
-elif mode==1:
-        showContentLatest()
-elif mode==2:
-        playVideo(url)
-elif mode==3:
-        showContent(url)
-elif mode==4:
-        search()
+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)
+
+if mode == 'listVideos':
+    listVideos(url)
+elif mode == 'playVideo':
+    playVideo(url)
+elif mode == 'bestOf':
+    bestOf()
+elif mode == 'search':
+    search()
+else:
+    index()
diff --git 
a/plugin.video.bestofyoutube_com/resources/language/English/strings.xml 
b/plugin.video.bestofyoutube_com/resources/language/English/strings.xml
index 89d5840..ba8755b 100644
--- a/plugin.video.bestofyoutube_com/resources/language/English/strings.xml
+++ b/plugin.video.bestofyoutube_com/resources/language/English/strings.xml
@@ -1,10 +1,14 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <strings>
-  <string id="30001">Newest 100</string>
-  <string id="30002">Best of: Week</string>
-  <string id="30003">Best of: Month</string>
-  <string id="30004">Best of: Year</string>
-  <string id="30005">Best of: All Time</string>
-  <string id="30006">Random Videos</string>
-  <string id="30007">Video Search</string>
+  <string id="30001">Newest</string>
+  <string id="30002">Week</string>
+  <string id="30003">Month</string>
+  <string id="30004">Year</string>
+  <string id="30005">All Time</string>
+  <string id="30006">Random</string>
+  <string id="30007">Search</string>
+  <string id="30008">Best of</string>
+  <string id="30009">Next Page</string>
+  <string id="30101">Force View</string>
+  <string id="30102">ViewID</string>
 </strings>

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

Summary of changes:
 plugin.video.bestofyoutube_com/addon.xml           |    4 +-
 plugin.video.bestofyoutube_com/changelog.txt       |   20 +-
 plugin.video.bestofyoutube_com/default.py          |  162 ++++++------
 .../resources/language/English/strings.xml         |   18 +-
 .../resources/settings.xml                         |    0
 plugin.video.cbsnews_com/addon.xml                 |    2 +-
 plugin.video.cbsnews_com/changelog.txt             |    6 +-
 plugin.video.cbsnews_com/default.py                |   30 ++-
 .../resources/language/English/strings.xml         |    5 +-
 .../resources/language/German/strings.xml          |    2 +-
 plugin.video.cbsnews_com/resources/settings.xml    |    1 +
 .../LICENSE.txt                                    |    0
 plugin.video.howstuffworks_com/addon.xml           |   16 ++
 plugin.video.howstuffworks_com/changelog.txt       |    4 +
 plugin.video.howstuffworks_com/default.py          |  269 ++++++++++++++++++++
 plugin.video.howstuffworks_com/icon.png            |  Bin 0 -> 11995 bytes
 .../resources/language/English/strings.xml         |   13 +
 .../resources/language/German/strings.xml          |    6 +
 .../resources/settings.xml                         |    5 +
 plugin.video.mpora_com/addon.xml                   |    2 +-
 plugin.video.mpora_com/changelog.txt               |    4 +-
 plugin.video.mpora_com/default.py                  |   55 +---
 .../resources/language/English/strings.xml         |    4 +-
 .../resources/language/German/strings.xml          |    4 +-
 .../LICENSE.txt                                    |    0
 plugin.video.myspass_de/addon.xml                  |   18 ++
 .../changelog.txt                                  |    0
 plugin.video.myspass_de/default.py                 |  215 ++++++++++++++++
 plugin.video.myspass_de/icon.png                   |  Bin 0 -> 6824 bytes
 .../resources/language/English/strings.xml         |   14 +
 .../resources/language/German/strings.xml          |   12 +
 .../resources/settings.xml                         |    0
 .../LICENSE.txt                                    |    0
 plugin.video.theonion_com/addon.xml                |   16 ++
 .../changelog.txt                                  |    0
 plugin.video.theonion_com/default.py               |  118 +++++++++
 plugin.video.theonion_com/icon.png                 |  Bin 0 -> 20035 bytes
 .../resources/language/English/strings.xml         |    7 +
 .../resources/language/German/strings.xml          |    6 +
 .../resources/settings.xml                         |    0
 40 files changed, 877 insertions(+), 161 deletions(-)
 copy {plugin.audio.einslive_de => 
plugin.video.bestofyoutube_com}/resources/settings.xml (100%)
 copy {plugin.audio.einslive_de => plugin.video.howstuffworks_com}/LICENSE.txt 
(100%)
 create mode 100644 plugin.video.howstuffworks_com/addon.xml
 create mode 100644 plugin.video.howstuffworks_com/changelog.txt
 create mode 100644 plugin.video.howstuffworks_com/default.py
 create mode 100644 plugin.video.howstuffworks_com/icon.png
 create mode 100644 
plugin.video.howstuffworks_com/resources/language/English/strings.xml
 create mode 100644 
plugin.video.howstuffworks_com/resources/language/German/strings.xml
 create mode 100644 plugin.video.howstuffworks_com/resources/settings.xml
 copy {plugin.audio.einslive_de => plugin.video.myspass_de}/LICENSE.txt (100%)
 create mode 100644 plugin.video.myspass_de/addon.xml
 copy {plugin.video.chefkoch_de => plugin.video.myspass_de}/changelog.txt (100%)
 create mode 100644 plugin.video.myspass_de/default.py
 create mode 100644 plugin.video.myspass_de/icon.png
 create mode 100644 
plugin.video.myspass_de/resources/language/English/strings.xml
 create mode 100644 
plugin.video.myspass_de/resources/language/German/strings.xml
 copy {plugin.audio.einslive_de => 
plugin.video.myspass_de}/resources/settings.xml (100%)
 copy {plugin.audio.einslive_de => plugin.video.theonion_com}/LICENSE.txt (100%)
 create mode 100644 plugin.video.theonion_com/addon.xml
 copy {plugin.video.chefkoch_de => plugin.video.theonion_com}/changelog.txt 
(100%)
 create mode 100644 plugin.video.theonion_com/default.py
 create mode 100644 plugin.video.theonion_com/icon.png
 create mode 100644 
plugin.video.theonion_com/resources/language/English/strings.xml
 create mode 100644 
plugin.video.theonion_com/resources/language/German/strings.xml
 copy {plugin.audio.einslive_de => 
plugin.video.theonion_com}/resources/settings.xml (100%)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to