The branch, frodo has been updated
       via  56824a209180ca76f7f5d8257aa3495966878e92 (commit)
       via  09be39398dfff7bc5eeafec02d1092407d9a1f15 (commit)
       via  231553cf2cb0768b21de23994ae523dd4db61e6c (commit)
      from  21c58f5eb96b6dd4fb0b5c59abdd34779988bdba (commit)

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


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


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

commit 231553cf2cb0768b21de23994ae523dd4db61e6c
Author: beenje <[email protected]>
Date:   Thu Nov 21 21:35:02 2013 +0100

    [plugin.video.bestofyoutube_com] updated to version 2.1.1

diff --git a/plugin.video.bestofyoutube_com/addon.xml 
b/plugin.video.bestofyoutube_com/addon.xml
index 46e5b1e..a5db388 100644
--- a/plugin.video.bestofyoutube_com/addon.xml
+++ b/plugin.video.bestofyoutube_com/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<addon id="plugin.video.bestofyoutube_com" name="BestOfYoutube.com" 
version="2.1.0" provider-name="AddonScriptorDE">
+<addon id="plugin.video.bestofyoutube_com" name="BestOfYoutube.com" 
version="2.1.1" provider-name="AddonScriptorDE">
     <requires>
         <import addon="xbmc.python" version="2.1.0"/>
         <import addon="plugin.video.youtube" version="3.0.0"/>
@@ -14,9 +14,10 @@
         <language></language>
         <description lang="en">Only the best Youtube clips</description>
         <description lang="de">Nur die besten Youtube Videos</description>
-        <website>http://www.bestofyoutube.com</website>
+        <license>GNU GENERAL PUBLIC LICENSE. Version 2, June 1991</license>
         
<source>https://github.com/AddonScriptorDE/plugin.video.bestofyoutube_com</source>
         <forum>http://forum.xbmc.org/showthread.php?tid=132564</forum>
         <email>AddonScriptorDE at yahoo dot de</email>
+        <website>http://www.bestofyoutube.com</website>
     </extension>
 </addon>
diff --git a/plugin.video.bestofyoutube_com/changelog.txt 
b/plugin.video.bestofyoutube_com/changelog.txt
index 8fef9fe..4022eaa 100644
--- a/plugin.video.bestofyoutube_com/changelog.txt
+++ b/plugin.video.bestofyoutube_com/changelog.txt
@@ -1,5 +1,5 @@
 1.0.0
-- First Try
+- Initial release
 1.0.1
 - Changed addon.xml
 1.0.2
@@ -18,3 +18,6 @@
 - Fixed site changes
 2.0.9
 - Fixed site changes
+2.1.1
+- Added custom user-agent
+- Video listing now makes 2 requests (to show more videos)
diff --git a/plugin.video.bestofyoutube_com/default.py 
b/plugin.video.bestofyoutube_com/default.py
index 5948b42..9b79071 100644
--- a/plugin.video.bestofyoutube_com/default.py
+++ b/plugin.video.bestofyoutube_com/default.py
@@ -12,21 +12,23 @@ import re
 addon = xbmcaddon.Addon()
 socket.setdefaulttimeout(30)
 pluginhandle = int(sys.argv[1])
+addonID = addon.getAddonInfo('id')
 xbox = xbmc.getCondVisibility("System.Platform.xbox")
 translation = addon.getLocalizedString
 forceViewMode = addon.getSetting("forceViewMode") == "true"
 filter = addon.getSetting("filter") == "true"
 filterRating=int(addon.getSetting("filterRating"))
 filterThreshold=int(addon.getSetting("filterThreshold"))
+icon = xbmc.translatePath('special://home/addons/'+addonID+'/icon.png')
 viewMode = str(addon.getSetting("viewMode"))
 urlMain = "http://www.bestofyoutube.com";
 
 
 def index():
-    addDir(translation(30001), urlMain, "listVideos", "")
-    addDir(translation(30008), "", "bestOf", "")
-    addDir(translation(30006), urlMain+"/index.php?show=random", "listVideos", 
"")
-    addDir(translation(30007), "", "search", "")
+    addDir(translation(30001), urlMain, "listVideos", icon)
+    addDir(translation(30008), "", "bestOf", icon)
+    addDir(translation(30006), urlMain+"/index.php?show=random", "listVideos", 
icon)
+    addDir(translation(30007), "", "search", icon)
     xbmcplugin.endOfDirectory(pluginhandle)
 
 
@@ -83,11 +85,20 @@ def listVideos(url):
     content = content[content.find('<div class="pagination">'):]
     content = content[:content.find('</div>')]
     spl = content.split("<a href=\"")
+    nextUrl = ""
     for i in range(1, len(spl), 1):
         entry = spl[i][:spl[i].find('</a>')]
         url = urlMain+"/"+entry[:entry.find('"')]
         if entry.find('next &#187;') >= 0:
-            addDir(translation(30009), url, "listVideos", '')
+            nextUrl = url
+            nextPage = url[url.find("page=")+5:]
+            if "&" in nextPage:
+                nextPage = nextPage[:nextPage.find("&")]
+    if nextUrl:
+        if int(nextPage)%2==0:
+            listVideos(nextUrl)
+        else:
+            addDir(translation(30009), nextUrl, "listVideos", '')
     xbmcplugin.endOfDirectory(pluginhandle)
     if forceViewMode:
         xbmc.executebuiltin('Container.SetViewMode('+viewMode+')')
@@ -95,7 +106,7 @@ def listVideos(url):
 
 def getUrl(url):
     req = urllib2.Request(url)
-    req.add_header('User-Agent', 'Mozilla/5.0 (Windows NT 6.1; rv:22.0) 
Gecko/20100101 Firefox/22.0')
+    req.add_header('User-Agent', 'BestOfYoutube XBMC Addon v2.1.1')
     response = urllib2.urlopen(req)
     content = response.read()
     response.close()

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

Summary of changes:
 plugin.video.bestofyoutube_com/addon.xml           |    5 +-
 plugin.video.bestofyoutube_com/changelog.txt       |    5 +-
 plugin.video.bestofyoutube_com/default.py          |   23 +-
 .../LICENSE.txt                                    |    0
 plugin.video.spiegel_tv/addon.xml                  |   23 ++
 .../changelog.txt                                  |    0
 plugin.video.spiegel_tv/default.py                 |  299 +++++++++++++++++
 plugin.video.spiegel_tv/icon.png                   |  Bin 0 -> 33582 bytes
 .../resources/language/English/strings.xml         |   14 +
 .../resources/language/German/strings.xml          |   12 +
 plugin.video.spiegel_tv/resources/settings.xml     |    6 +
 .../LICENSE.txt                                    |    0
 plugin.video.vice_com/addon.xml                    |   20 ++
 plugin.video.vice_com/changelog.txt                |    6 +
 plugin.video.vice_com/default.py                   |  337 ++++++++++++++++++++
 plugin.video.vice_com/icon.png                     |  Bin 0 -> 30862 bytes
 .../resources/language/English/strings.xml         |   14 +
 .../resources/language/German/strings.xml          |   13 +
 plugin.video.vice_com/resources/settings.xml       |    6 +
 19 files changed, 774 insertions(+), 9 deletions(-)
 copy {plugin.audio.booksshouldbefree_com => 
plugin.video.spiegel_tv}/LICENSE.txt (100%)
 create mode 100644 plugin.video.spiegel_tv/addon.xml
 copy {plugin.video.welt_der_wunder => plugin.video.spiegel_tv}/changelog.txt 
(100%)
 create mode 100644 plugin.video.spiegel_tv/default.py
 create mode 100644 plugin.video.spiegel_tv/icon.png
 create mode 100644 
plugin.video.spiegel_tv/resources/language/English/strings.xml
 create mode 100644 
plugin.video.spiegel_tv/resources/language/German/strings.xml
 create mode 100644 plugin.video.spiegel_tv/resources/settings.xml
 copy {plugin.audio.booksshouldbefree_com => plugin.video.vice_com}/LICENSE.txt 
(100%)
 create mode 100644 plugin.video.vice_com/addon.xml
 create mode 100644 plugin.video.vice_com/changelog.txt
 create mode 100644 plugin.video.vice_com/default.py
 create mode 100644 plugin.video.vice_com/icon.png
 create mode 100644 plugin.video.vice_com/resources/language/English/strings.xml
 create mode 100644 plugin.video.vice_com/resources/language/German/strings.xml
 create mode 100644 plugin.video.vice_com/resources/settings.xml


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to