The branch, eden has been updated
       via  42c7e31dd5f24284f059b2606457bfd1a64c6fad (commit)
      from  3266675828eeddce1c0c00d6680041673a6d3a2f (commit)

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

commit 42c7e31dd5f24284f059b2606457bfd1a64c6fad
Author: spiff <[email protected]>
Date:   Mon Mar 26 16:13:48 2012 +0200

    [plugin.video.cnet.podcasts] updated to version 1.0.2

diff --git a/plugin.video.cnet.podcasts/addon.xml 
b/plugin.video.cnet.podcasts/addon.xml
index 5205503..5fb79d3 100644
--- a/plugin.video.cnet.podcasts/addon.xml
+++ b/plugin.video.cnet.podcasts/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

 <addon id="plugin.video.cnet.podcasts"

        name="cnet Podcasts"

-       version="1.0.1"

+       version="1.0.2"

        provider-name="divingmule">

   <requires>

     <import addon="xbmc.python" version="2.0"/>

diff --git a/plugin.video.cnet.podcasts/changelog.txt 
b/plugin.video.cnet.podcasts/changelog.txt
index f486d61..04a3454 100644
--- a/plugin.video.cnet.podcasts/changelog.txt
+++ b/plugin.video.cnet.podcasts/changelog.txt
@@ -1,3 +1,7 @@
+version 1.0.2

+fix for feed changes

+new playback setting

+

 version - 1.0.1

 added the crave podcast

 

diff --git a/plugin.video.cnet.podcasts/default.py 
b/plugin.video.cnet.podcasts/default.py
index e0eb3f9..53cc670 100644
--- a/plugin.video.cnet.podcasts/default.py
+++ b/plugin.video.cnet.podcasts/default.py
@@ -6,54 +6,33 @@ __settings__ = 
xbmcaddon.Addon(id='plugin.video.cnet.podcasts')
 __language__ = __settings__.getLocalizedString

 home = __settings__.getAddonInfo('path')

 icon = xbmc.translatePath( os.path.join( home, 'icon.png' ) )

-if __settings__.getSetting('video_quality') != "0":

-    if __settings__.getSetting('video_quality') != "1":

-        __settings__.setSetting('video_quality', "0")

 

 

 def CATEGORIES():

-        if __settings__.getSetting('video_quality')=="0":

-            
addDir(__language__(30000),'http://feeds2.feedburner.com/cnet/allhdpodcast',3,'http://www.cnet.com/i/pod/images/allCNETvideo_600x600.jpg')

-            
addDir(__language__(30001),'http://feeds.feedburner.com/cnet/buzzreporthd',3,'http://www.cnet.com/i/pod/images/podcastsHD_buzzreport_600x600.jpg')

-            
addDir(__language__(30002),'http://feeds.feedburner.com/cnet/cnetnewshd',3,'http://www.cnet.com/i/pod/images/podcastsHD_news_600x600.jpg')

-            
addDir(__language__(30003),'http://feeds2.feedburner.com/cnet/cartechvideohd',3,'http://www.cnet.com/i/pod/images/podcastsHD_cartech_600x600.jpg')

-            
addDir(__language__(30004),'http://feeds.feedburner.com/cnet/applebytehd',3,'http://www.cnet.com//i/pod/images/podcastsHD_applebyte_600x600.jpg')

-            
addDir(__language__(30005),'http://feeds.feedburner.com/cnet/conversationshd',3,'http://www.cnet.com/i/pod/images/podcastsHD_conversations_600x600.jpg')

-            
addDir(__language__(30006),'http://feeds2.feedburner.com/cnet/loadedhd',3,'http://www.cnet.com/i/pod/images/podcastsHD_loaded_600x600.jpg')

-            
addDir(__language__(30007),'http://feeds2.feedburner.com/cnet/top5hd',3,'http://www.cnet.com/i/pod/images/podcastsHD_top5_600x600.jpg')

-            
addDir(__language__(30009),'http://feeds2.feedburner.com/cnet/firstlookhd',3,'http://www.cnet.com/i/pod/images/podcastsHD_firstlook_600x600.jpg')

-            
addDir(__language__(30010),'http://feeds2.feedburner.com/cnet/techreviewhd',3,'http://www.cnet.com/i/pod/images/cnetTechReviewHD_600x600.jpg')

-            
addDir(__language__(30011),'http://feeds2.feedburner.com/cnet/howtohd',3,'http://www.cnet.com/i/pod/images/podcastsHD_howto_600x600.jpg')

-            
addDir(__language__(30012),'http://feeds2.feedburner.com/cnet/greenshowhd',3,'http://www.cnet.com/i/pod/images/podcastsHD_greenshow_600x600.jpg')

-            
addDir(__language__(30013),'http://feeds2.feedburner.com/cnet/prizefighthd',3,'http://www.cnet.com/i/pod/images/podcastsHD_prizefight_600x600.jpg')

-            
addDir(__language__(30014),'http://feeds2.feedburner.com/cnet/tapthatapphd',3,'http://www.cnet.com/i/pod/images/tapThatAppHD_600x600.jpg')

-            
addDir(__language__(30018),'http://feeds.feedburner.com/cnet/bolhqvideo',3,'http://www.cnet.com/i/pod/images/bol_600x600.jpg')

-            
addDir(__language__(30016),'http://feeds.feedburner.com/cnet/the404hqvideo',3,'http://www.cnet.com/i/pod/images/the404_600x600.jpg')

-            
addDir(__language__(30017),'http://feeds.feedburner.com/cnet/pregamehq',3,'http://www.cnet.com/i/pod/images/pregame_d_600x600.jpg')

-            
addDir(__language__(30015),'http://feeds.feedburner.com/cnet/roundtablehqvideo',3,'http://www.cnet.com/i/pod/images/reporters_roundtable_600x600.jpg')

-            
addDir(__language__(30019),'http://feeds.feedburner.com/cnet/cravehq',3,'http://www.cnet.com/i/pod/images/crave600x600.jpg')

-        

-        elif __settings__.getSetting('video_quality')=="1":

-            
addDir(__language__(30000),'http://feeds2.feedburner.com/allcnetvideopodcasts',3,'http://www.cnet.com/i/pod/images/allCNETvideo_300x300.jpg')

-            
addDir(__language__(30001),'http://feeds.feedburner.com/cnet/buzzreport',3,'http://www.cnet.com/i/pod/images/buzzreport_600x600.jpg')

-            
#addDir(__language__(30002),'http://feeds.feedburner.com/cnet/cnetnews',3,'http://www.cnet.com/i/pod/images/podcasts_news_600x600.jpg')

-            
addDir(__language__(30003),'http://feeds.feedburner.com/cnet/cartechvideo?format=xml',3,'http://www.cnet.com/i/pod/images/cartech_600x600.jpg')

-            
addDir(__language__(30004),'http://feeds.feedburner.com/cnet/applebyte',3,'http://www.cnet.com//i/pod/images/applebyte_600x600.jpg')

-            
addDir(__language__(30005),'http://feeds.feedburner.com/cnet/conversations',3,'http://www.cnet.com/i/pod/images/cnetconversations_600x600.jpg')

-            
addDir(__language__(30006),'http://feeds2.feedburner.com/cnet/loaded',3,'http://www.cnet.com/i/pod/images/loaded_600x600.jpg')

-            
addDir(__language__(30007),'http://feeds2.feedburner.com/cnet/top5',3,'http://www.cnet.com/i/pod/images/top5_600x600.jpg')

-            
addDir(__language__(30008),'http://feeds2.feedburner.com/cnet/dialedinvideo',3,'http://www.cnet.com/i/pod/images/dialedin_600x600.jpg')

-            
addDir(__language__(30009),'http://feeds2.feedburner.com/cnet/firstlook',3,'http://www.cnet.com/i/pod/images/firstlook_600x600.jpg')

-            
addDir(__language__(30010),'http://feeds2.feedburner.com/cnet/techreview',3,'http://www.cnet.com/i/pod/images/cnetTechReview_600x600.jpg')

-            
addDir(__language__(30011),'http://feeds2.feedburner.com/cnet/howto',3,'http://www.cnet.com/i/pod/images/HowTo_300x300.jpg')

-            
addDir(__language__(30012),'http://feeds2.feedburner.com/cnet/greenshow',3,'http://www.cnet.com/i/pod/images/greenshow_300x300.jpg')

-            
addDir(__language__(30013),'http://feeds2.feedburner.com/cnet/prizefight',3,'http://www.cnet.com/i/pod/images/prizefight_300x300.jpg')

-            
addDir(__language__(30014),'http://feeds2.feedburner.com/cnet/tapthatapp',3,'http://www.cnet.com/i/pod/images/tapThatApp_600x600.jpg')

-            
addDir(__language__(30015),'http://feeds.feedburner.com/cnet/roundtablevideo',3,'http://www.cnet.com/i/pod/images/reporters_roundtable_600x600.jpg')

-            
addDir(__language__(30016),'http://feeds.feedburner.com/cnet/the404video',3,'http://www.cnet.com/i/pod/images/the404_600x600.jpg')

-            
addDir(__language__(30017),'http://feeds.feedburner.com/cnet/pregame',3,'http://www.cnet.com/i/pod/images/pregame_d_600x600.jpg')

-            
addDir(__language__(30018),'http://feeds.feedburner.com/cnet/bolvideo',3,'http://www.cnet.com/i/pod/images/bol_600x600.jpg')

-            
addDir(__language__(30019),'http://feeds.feedburner.com/cnet/crave',3,'http://www.cnet.com/i/pod/images/crave600x600.jpg')

+        addDir(__language__(30000), 'allcnetvideopodcasts', 'allhdpodcast', 
'http://audiopodcasts.cnet.com/', 3, 'allCNETvideo_600x600.jpg')

+        addDir(__language__(30001), 'buzzreport', 'buzzreporthd', 
'',3,'podcastsHD_buzzreport_600x600.jpg')

+        addDir(__language__(30002), 'news', 'cnetnewshd', 
'',3,'podcastsHD_news_600x600.jpg')

+        addDir(__language__(30003), 'cartechvideo', 'cartechvideohd', 
'',3,'podcastsHD_cartech_600x600.jpg')

+        addDir(__language__(30012), 'cartechpodcastvideo', '', 
'cartech',3,'cnet_cartech_600.jpg')

+        addDir(__language__(30004), 'applebyte', 'applebytehd', 
'',3,'podcastsHD_applebyte_600x600.jpg')

+        addDir(__language__(30005), 'conversations', 'conversationshd', 
'',3,'podcastsHD_conversations_600x600.jpg')

+        addDir(__language__(30006), 'loaded', 'loadedhd', '', 3, 
'podcastsHD_loaded_600x600.jpg')

+        addDir(__language__(30007), 'top5', 'top5hd', 
'',3,'podcastsHD_top5_600x600.jpg')

+        addDir(__language__(30009), 'firstlook', 'firstlookhd', '', 3, 
'podcastsHD_firstlook_600x600.jpg')

+        addDir(__language__(30010), 'techreview', 'techreviewhd', '', 3, 
'cnetTechReviewHD_600x600.jpg')

+        addDir(__language__(30011), 'howto', 'howtohd', '', 3, 
'podcastsHD_howto_600x600.jpg')

+        addDir(__language__(30013), 'prizefight', 'prizefighthd', '', 3, 
'podcastsHD_prizefight_600x600.jpg')

+        addDir(__language__(30014), 'tapthatapp', 'tapthatapphd', '', 3, 
'tapThatAppHD_600x600.jpg')

+        addDir(__language__(30015), 'roundtablevideo', 'roundtablehqvideo', 
'roundtablepodcast',3,'reporters_roundtable_600x600.jpg')

+        addDir(__language__(30018), 'bolvideo', 'bolhqvideo', '', 3, 
'bol_600x600.jpg')

+        addDir(__language__(30016), 'the404video', 'the404hqvideo', 'The404', 
3, 'the404_600x600.jpg')

+        addDir(__language__(30017), 'pregame', 'pregamehq', '', 3, 
'pregame_d_600x600.jpg')

+        addDir(__language__(30018), 'bolvideo', 'bolhqvideo', '', 3, 
'bol_600x600.jpg')

+        addDir(__language__(30019), 'crave', 'cravehq', '', 3, 
'crave600x600.jpg')

+        addDir(__language__(30020), 'androidatlassd', 'androidatlashq', '', 3, 
'androidatlas_600x600_jh.jpg')

+        addDir(__language__(30025), 'rumorhasitsd', 'rumorhasithq', '', 3, 
'rumorHasIt_300x300.jpg')

+        addDir(__language__(30026), 'dialedinvideo', '', 'dialedin', 3, 
'http://i.i.com.com/cnwk.1d/i/tim/2012/01/23/DialedIn_600x600_600x600.jpg')

+        addDir(__language__(30027), 'deviceconquersd', 'deviceconquerhd', '', 
3, 'http://www.cnet.com/i/pod/cast/Device&Conquer300x300.jpg')

 

 

 def GetInHMS(seconds):

@@ -64,32 +43,55 @@ def GetInHMS(seconds):
     if hours == 0:

         return "%02d:%02d" % (minutes, seconds)

     return "%02d:%02d:%02d" % (hours, minutes, seconds)

-    

-               

-def INDEX(url,iconimage):

-        req = urllib2.Request(url)

+

+

+def INDEX(url,hd_url,audio_url,iconimage):

+        playback = __settings__.getSetting('playback')

+        if playback == '0':

+            link = audio_url

+        elif playback == '1':

+            link = hd_url

+        else:

+            link = url

+        if link == '':

+            link = url

+        if not link.startswith('http'):

+            link = 'http://feeds.feedburner.com/cnet/'+link+'?format=xml'

+            replace_list = ['rumorhasit', 'deviceconque']

+            for i in replace_list:

+                if i in link:

+                    link = link.replace('cnet/','')

+        req = urllib2.Request(link)

         req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; 
en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')

         response = urllib2.urlopen(req)

         link=response.read()

         response.close()

         soup = BeautifulStoneSoup(link, 
convertEntities=BeautifulStoneSoup.XML_ENTITIES)

-        videos = soup('item')

-        for item in videos:

+        for i in soup('item'):

+            name = i('title')[0].string

+            try:

+                url = i('media:content')[0]['url']

+            except:

+                print ' --- No media:content url for "%s" --- ' %name

+                continue

+            try:

+                desc = i('itunes:summary')[0].string

+            except:

+                desc = ''

+            try:

+                date = i('pubdate')[0].string

+            except:

+                date = ''

             try:

-                name = item('title')[0].string

-                desc = item('itunes:summary')[0].string

-                url = item('media:content')[0]['url']

-                link = item('link')[0].string

-                date = item('pubdate')[0].string

-                seconds = item('itunes:duration')[0].string

+                seconds = i('itunes:duration')[0].string

                 duration = str(GetInHMS(int(seconds)))

-                description = desc+' \n\n'+date

-                liz=xbmcgui.ListItem(name, iconImage="DefaultVideo.png", 
thumbnailImage=iconimage)

-                liz.setInfo( type="Video", infoLabels={ "Title": 
name,"Plot":description, "Duration":duration } )

-                liz.setProperty( "Fanart_Image", iconimage )

-                
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=link,listitem=liz)

             except:

-                pass

+                duration = ''

+            description = desc+' \n\n'+date

+            liz=xbmcgui.ListItem(name, iconImage=iconimage, 
thumbnailImage=iconimage)

+            liz.setInfo( type="Video", infoLabels={ "Title": 
name,"Plot":description, "Duration":duration } )

+            liz.setProperty( "Fanart_Image", iconimage )

+            
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=liz)

 

 

 def get_params():

@@ -107,12 +109,17 @@ def get_params():
                 splitparams=pairsofparams[i].split('=')

                 if (len(splitparams))==2:

                     param[splitparams[0]]=splitparams[1]

-

         return param

 

 

-def addDir(name,url,mode,iconimage):

-        
u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)+"&name="+urllib.quote_plus(name)+"&iconimage="+str(iconimage)

+def addDir(name,url,hd_url,audio_url,mode,iconimage):

+        if not iconimage.startswith('http'):

+            iconimage = 'http://www.cnet.com/i/pod/images/'+iconimage

+        if __settings__.getSetting('playback') == '0':

+            if not audio_url == '':

+                name = name + __language__(30028)

+        
u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&hd_url="+urllib.quote_plus(hd_url)+"&audio_url="+\

+        
urllib.quote_plus(audio_url)+"&mode="+str(mode)+"&name="+urllib.quote_plus(name)+"&iconimage="+str(iconimage)

         ok=True

         liz=xbmcgui.ListItem(name, iconImage="DefaultFolder.png", 
thumbnailImage=iconimage)

         liz.setInfo( type="Video", infoLabels={ "Title": name } )

@@ -131,6 +138,14 @@ try:
 except:

     pass

 try:

+    hd_url=urllib.unquote_plus(params["hd_url"])

+except:

+    pass

+try:

+    audio_url=urllib.unquote_plus(params["audio_url"])

+except:

+    pass

+try:

     name=urllib.unquote_plus(params["name"])

 except:

     pass

@@ -148,11 +163,9 @@ print "URL: "+str(url)
 print "Name: "+str(name)

 

 if mode==None:

-    print ""

     CATEGORIES()

 

 elif mode==3:

-    print ""+url

-    INDEX(url,iconimage)

-               

+    INDEX(url,hd_url,audio_url,iconimage)

+

 xbmcplugin.endOfDirectory(int(sys.argv[1]))

diff --git a/plugin.video.cnet.podcasts/resources/language/English/strings.xml 
b/plugin.video.cnet.podcasts/resources/language/English/strings.xml
index b1bce0a..ac21f0d 100644
--- a/plugin.video.cnet.podcasts/resources/language/English/strings.xml
+++ b/plugin.video.cnet.podcasts/resources/language/English/strings.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
 <strings>
-  <string id="30000">Most Recent CNET Video Podcasts</string>
+  <string id="30000">Most Recent</string>
   <string id="30001">Buzz Report</string>
   <string id="30002">CNET News</string>
   <string id="30003">Car Tech</string>
@@ -12,19 +12,21 @@
   <string id="30009">First Look</string>
   <string id="30010">CNET Tech Review</string>
   <string id="30011">How To</string>
-  <string id="30012">The Green Show</string>
+  <string id="30012">Car Tech Live</string>
   <string id="30013">Prizefight</string>
   <string id="30014">Tap That App</string>
-  <string id="30015">Reporters' Roundtable Video</string>
+  <string id="30015">Reporters' Roundtable</string>
   <string id="30016">The 404 Video</string>
   <string id='30017'>preGAME</string>
   <string id='30018'>Buzz Out Loud</string>
   <string id='30019'>Crave</string>
-  <string id='30020'></string>
-  <string id='30021'></string>
+  <string id='30020'>Android Atlas Weekly</string>
+  <string id='30021'>Audio</string>
   <string id='30022'>HD</string>
   <string id='30023'>SD</string>
-  <string id='30024'>Video Quality</string>
-  <string id='30025'></string>
-
+  <string id='30024'>Playback Type (if available)</string>
+  <string id='30025'>Rumor Has It</string>
+  <string id='30026'>Dialed In Video</string>
+  <string id='30027'>Device and Conquer</string>
+  <string id='30028'>  (audio)</string>
 </strings>
diff --git a/plugin.video.cnet.podcasts/resources/settings.xml 
b/plugin.video.cnet.podcasts/resources/settings.xml
index eab72ce..88d0ba6 100644
--- a/plugin.video.cnet.podcasts/resources/settings.xml
+++ b/plugin.video.cnet.podcasts/resources/settings.xml
@@ -1,3 +1,3 @@
 <settings>

-   <setting id="video_quality" type="enum" lvalues="30022|30023" label="30024" 
default="0"/>

+   <setting id="playback" type="enum" lvalues="30021|30022|30023" 
label="30024" default="1"/>

 </settings>
\ No newline at end of file

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

Summary of changes:
 plugin.video.cnet.podcasts/addon.xml               |    2 +-
 plugin.video.cnet.podcasts/changelog.txt           |    4 +
 plugin.video.cnet.podcasts/default.py              |  153 +++++++++++---------
 .../resources/language/English/strings.xml         |   18 ++-
 plugin.video.cnet.podcasts/resources/settings.xml  |    2 +-
 5 files changed, 99 insertions(+), 80 deletions(-)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to