The branch, eden-pre has been updated
       via  d5057c26ff53677c3b8d3219b6028f185b49c4f2 (commit)
       via  f513037497ea327f4b2becb432879c40960a37b6 (commit)
       via  24e0fe0301e837171418aeaa0cfeaa06f1cee0fa (commit)
       via  b81b1e720c24cdfdf59fcad5d80713b1a67de2d7 (commit)
       via  7c287dbd9326532b02504de98cd60a685358b48c (commit)
      from  e3b0ccb8b3d65faa7e831a1f0ce6c50157da5d24 (commit)

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


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


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


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


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

commit 7c287dbd9326532b02504de98cd60a685358b48c
Author: spiff <[email protected]>
Date:   Tue May 17 15:25:42 2011 +0200

    [plugin.video.engadget] updated to version 1.0.1

diff --git a/plugin.video.engadget/addon.xml b/plugin.video.engadget/addon.xml
index 1af33f3..3689753 100644
--- a/plugin.video.engadget/addon.xml
+++ b/plugin.video.engadget/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

 <addon id="plugin.video.engadget"

        name="Engadget"

-       version="1.0.0"

+       version="1.0.1"

        provider-name="divingmule">

   <requires>

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

diff --git a/plugin.video.engadget/changelog.txt 
b/plugin.video.engadget/changelog.txt
index ae38eba..1b5ce67 100644
--- a/plugin.video.engadget/changelog.txt
+++ b/plugin.video.engadget/changelog.txt
@@ -1,3 +1,6 @@
+Version 1.0.1

+added download to the context menu

+

 Version 0.0.2

 new icon, thanks freezy!

 

diff --git a/plugin.video.engadget/default.py b/plugin.video.engadget/default.py
index ffce115..f457ddc 100644
--- a/plugin.video.engadget/default.py
+++ b/plugin.video.engadget/default.py
@@ -12,116 +12,165 @@ videoq = __settings__.getSetting('video_quality')
 

 

 def Categories():

-               
addDir(__language__(30000),'http://www.engadget.com/engadgetshow.xml',1,showicon)

-               
addDir(__language__(30001),'http://api.viddler.com/api/v2/viddler.videos.getByUser.xml?key=tg50w8nr11q8176liowh&user=engadget',2,icon)

+        
addDir(__language__(30000),'http://www.engadget.com/engadgetshow.xml',1,showicon)

+        
addDir(__language__(30001),'http://api.viddler.com/api/v2/viddler.videos.getByUser.xml?key=tg50w8nr11q8176liowh&user=engadget',2,icon)

 

 

 def getEngadgetVideos(url):

-               req = urllib2.Request(url)

-               response = urllib2.urlopen(req)

-               link=response.read()

-               response.close()

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

-               videos = soup('video_list')[0]('video')

-               page = int(soup('list_result')[0]('page')[0].string)+1

-               for video in videos:

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

-                               link = video('html5_video_source')[0].string

-                               thumb = video('thumbnail_url')[0].string

-                               length = video('length')[0].string

-                               addLink(name,link,length,thumb)

-               
addDir(__language__(30006),'http://api.viddler.com/api/v2/viddler.videos.getByUser.xml?key=tg50w8nr11q8176liowh&user=engadget&page='+str(page),2,nexticon)

+        req = urllib2.Request(url)

+        response = urllib2.urlopen(req)

+        link=response.read()

+        response.close()

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

+        videos = soup('video_list')[0]('video')

+        page = int(soup('list_result')[0]('page')[0].string)+1

+        for video in videos:

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

+                link = video('html5_video_source')[0].string

+                thumb = video('thumbnail_url')[0].string

+                length = video('length')[0].string

+                addLink(name,link,length,thumb)

+        
addDir(__language__(30006),'http://api.viddler.com/api/v2/viddler.videos.getByUser.xml?key=tg50w8nr11q8176liowh&user=engadget&page='+str(page),2,nexticon)

 

 

 def getEngadgetShow(url):

-               url = 'http://www.engadget.com/engadgetshow.xml'

-               req = urllib2.Request(url)

-               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()

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

-               episodes = soup('item')

-               for episode in episodes:

-                               url = episode('enclosure')[0]['url']

-                               title = 
episode('enclosure')[0]('itunes:subtitle')[0].string

-                               thumbnail = 
'http://www.blogcdn.com/www.engadget.com/media/2009/09/show_front_sm.jpg'

-                               if videoq == '0':

-                                               
url=url.replace('900.mp4','500.mp4')

-                               elif videoq == '2':

-                                               
url=url.replace('900.mp4','2500.mp4')

-                               else:

-                                               url=url

-                               addLink(title,url,'',thumbnail)

-

-       

+        url = 'http://www.engadget.com/engadgetshow.xml'

+        req = urllib2.Request(url)

+        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()

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

+        episodes = soup('item')

+        for episode in episodes:

+                url = episode('enclosure')[0]['url']

+                title = episode('enclosure')[0]('itunes:subtitle')[0].string

+                duration = episode('enclosure')[0]('itunes:duration')[0].string

+                thumbnail = 
'http://www.blogcdn.com/www.engadget.com/media/2009/09/show_front_sm.jpg'

+                if videoq == '0':

+                        url=url.replace('900.mp4','500.mp4')

+                elif videoq == '2':

+                        url=url.replace('900.mp4','2500.mp4')

+                else:

+                        url=url

+                addLink(title,url,duration,thumbnail,True)

+

+

+class DownloadFiles:

+        def __init__(self):

+                url = sys.argv[2]

+                filename = sys.argv[3]

+                def download(url, dest):

+                        dialog = xbmcgui.DialogProgress()

+                        dialog.create(__language__(30015),__language__(30016), 
filename)

+                        urllib.urlretrieve(url, dest, lambda nb, bs, fs, url = 
url: _pbhook(nb, bs, fs, url, dialog))

+                def _pbhook(numblocks, blocksize, filesize, url = None,dialog 
= None):

+                        try:

+                                percent = min((numblocks * blocksize * 100) / 
filesize, 100)

+                                dialog.update(percent)

+                        except:

+                                percent = 100

+                                dialog.update(percent)

+                        if dialog.iscanceled():

+                                dialog.close()

+                # check for a download location, if not open settings

+                if (__settings__.getSetting('save_path') == ''):

+                        __settings__.openSettings('save_path')

+                # lets the user rename the file

+                keyboard = xbmc.Keyboard(filename,__language__(30011))

+                keyboard.doModal()

+                if (keyboard.isConfirmed() == False):

+                        return

+                filename = keyboard.getText()

+                if len(filename) == 0:

+                        return

+                filepath = 
xbmc.translatePath(os.path.join(__settings__.getSetting('save_path'),filename))

+                download(url, filepath)

+                if __settings__.getSetting('play') == "true":

+                    play=xbmc.Player().play( xbmc.translatePath( os.path.join( 
__settings__.getSetting('save_path'), filename ) ))

+                

+                

 def get_params():

-               param=[]

-               paramstring=sys.argv[2]

-               if len(paramstring)>=2:

-                               params=sys.argv[2]

-                               cleanedparams=params.replace('?','')

-                               if (params[len(params)-1]=='/'):

-                                               params=params[0:len(params)-2]

-                               pairsofparams=cleanedparams.split('&')

-                               param={}

-                               for i in range(len(pairsofparams)):

-                                               splitparams={}

-                                               
splitparams=pairsofparams[i].split('=')

-                                               if (len(splitparams))==2:

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

-                                                               

-               return param

-

-

-def addLink(name,url,duration,iconimage):

-               ok=True

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

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

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

-               return ok

+        param=[]

+        paramstring=sys.argv[2]

+        if len(paramstring)>=2:

+                params=sys.argv[2]

+                cleanedparams=params.replace('?','')

+                if (params[len(params)-1]=='/'):

+                        params=params[0:len(params)-2]

+                pairsofparams=cleanedparams.split('&')

+                param={}

+                for i in range(len(pairsofparams)):

+                        splitparams={}

+                        splitparams=pairsofparams[i].split('=')

+                        if (len(splitparams))==2:

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

+                                

+        return param

+

+

+def addLink(name,url,duration,iconimage,showcontext=True):

+        ok=True

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

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

+        if showcontext:

+                try:

+                        filename = name.replace(':','-')+'.mp4'

+                except:

+                        pass

+                contextMenu = 
[(__language__(30004),'XBMC.RunScript('+xbmc.translatePath( os.path.join( home, 
'default.py' ) )+',download,'+url+','+filename+')')]

+                liz.addContextMenuItems(contextMenu)

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

+        return ok

 

 

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

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

-               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=get_params()

-url=None

-name=None

-mode=None

-

-try:

-               url=urllib.unquote_plus(params["url"])

-except:

-               pass

-try:

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

-except:

-               pass

-try:

-               mode=int(params["mode"])

-except:

-               pass

-

-print "Mode: "+str(mode)

-print "URL: "+str(url)

-print "Name: "+str(name)

-

-if mode==None:

-               print ""

-               Categories()

-               

-if mode==1:

-               print""

-               getEngadgetShow(url)

-               

-if mode==2:

-               print""

-               getEngadgetVideos(url)

-               

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

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

+        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 startPlugin():                     

+    params=get_params()

+    url=None

+    name=None

+    mode=None

+

+    try:

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

+    except:

+            pass

+    try:

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

+    except:

+            pass

+    try:

+            mode=int(params["mode"])

+    except:

+            pass

+

+    print "Mode: "+str(mode)

+    print "URL: "+str(url)

+    print "Name: "+str(name)

+

+    if mode==None:

+            print ""

+            Categories()

+            

+    if mode==1:

+            print""

+            getEngadgetShow(url)

+            

+    if mode==2:

+            print""

+            getEngadgetVideos(url)

+

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

+    

+if sys.argv[1] == 'download':

+        DownloadFiles()

+        

+else:

+        startPlugin()
\ No newline at end of file
diff --git a/plugin.video.engadget/resources/language/English/strings.xml 
b/plugin.video.engadget/resources/language/English/strings.xml
index bfb700a..b3933fc 100644
--- a/plugin.video.engadget/resources/language/English/strings.xml
+++ b/plugin.video.engadget/resources/language/English/strings.xml
@@ -3,9 +3,9 @@
   <string id="30000">The Engadget Show</string>
   <string id="30001">Engadget Videos</string>
   <string id="30002"></string>
-  <string id="30003"></string>
-  <string id="30004"></string>
-  <string id="30005"></string>
+  <string id="30003">Play after downloading</string>
+  <string id="30004">Download</string>
+  <string id="30005">Select Download Location</string>
   <string id="30006">Next Page</string>
   <string id="30007">The Engadget Show - Video Quality</string>
   <string id="30008">Low</string>
diff --git a/plugin.video.engadget/resources/settings.xml 
b/plugin.video.engadget/resources/settings.xml
index 11a2fa0..b25747c 100644
--- a/plugin.video.engadget/resources/settings.xml
+++ b/plugin.video.engadget/resources/settings.xml
@@ -1,3 +1,5 @@
 <settings>

    <setting id="video_quality" type="enum" lvalues="30008|30009|30010" 
label="30007" default="2"/>

+   <setting id="save_path" type="folder"  source="files" label="30005"  
option="writeable" default=""/>

+   <setting id="play" type="bool" label="30003" default="false" />

 </settings>
\ No newline at end of file

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

Summary of changes:
 plugin.video.engadget/addon.xml                    |    2 +-
 plugin.video.engadget/changelog.txt                |    3 +
 plugin.video.engadget/default.py                   |  255 ++++++++++++--------
 .../resources/language/English/strings.xml         |    6 +-
 plugin.video.engadget/resources/settings.xml       |    2 +
 .../LICENSE.txt                                    |    0
 plugin.video.funny.or.die/addon.xml                |   19 ++
 plugin.video.funny.or.die/changelog.txt            |   20 ++
 plugin.video.funny.or.die/default.py               |  210 ++++++++++++++++
 plugin.video.funny.or.die/icon.png                 |  Bin 0 -> 51003 bytes
 .../resources/language/English/strings.xml         |   26 ++
 plugin.video.funny.or.die/resources/settings.xml   |    3 +
 .../LICENSE.txt                                    |    0
 .../addon.xml                                      |    8 +-
 plugin.video.hgtv/changelog.txt                    |    2 +
 plugin.video.hgtv/default.py                       |  127 ++++++++++
 plugin.video.hgtv/icon.png                         |  Bin 0 -> 30354 bytes
 .../LICENSE.txt                                    |    0
 .../addon.xml                                      |    8 +-
 plugin.video.techcrunch/default.py                 |  144 +++++++++++
 plugin.video.techcrunch/icon.png                   |  Bin 0 -> 36184 bytes
 .../LICENSE.txt                                    |    0
 .../addon.xml                                      |   11 +-
 plugin.video.twit/changelog.txt                    |   33 +++
 plugin.video.twit/default.py                       |  230 ++++++++++++++++++
 plugin.video.twit/icon.png                         |  Bin 0 -> 21647 bytes
 .../resources/language/English/strings.xml         |   39 +++
 plugin.video.twit/resources/live.png               |  Bin 0 -> 14425 bytes
 plugin.video.twit/resources/settings.xml           |    3 +
 29 files changed, 1031 insertions(+), 120 deletions(-)
 copy {plugin.video.cnet.podcasts => plugin.video.funny.or.die}/LICENSE.txt 
(100%)
 create mode 100644 plugin.video.funny.or.die/addon.xml
 create mode 100644 plugin.video.funny.or.die/changelog.txt
 create mode 100644 plugin.video.funny.or.die/default.py
 create mode 100644 plugin.video.funny.or.die/icon.png
 create mode 100644 
plugin.video.funny.or.die/resources/language/English/strings.xml
 create mode 100644 plugin.video.funny.or.die/resources/settings.xml
 copy {plugin.video.cnet.podcasts => plugin.video.hgtv}/LICENSE.txt (100%)
 copy {plugin.video.foodnetwork => plugin.video.hgtv}/addon.xml (77%)
 create mode 100644 plugin.video.hgtv/changelog.txt
 create mode 100644 plugin.video.hgtv/default.py
 create mode 100644 plugin.video.hgtv/icon.png
 copy {plugin.video.cnet.podcasts => plugin.video.techcrunch}/LICENSE.txt (100%)
 copy {plugin.video.engadget => plugin.video.techcrunch}/addon.xml (60%)
 create mode 100644 plugin.video.techcrunch/default.py
 create mode 100644 plugin.video.techcrunch/icon.png
 copy {plugin.video.cnet.podcasts => plugin.video.twit}/LICENSE.txt (100%)
 copy {plugin.video.cnet.podcasts => plugin.video.twit}/addon.xml (58%)
 create mode 100644 plugin.video.twit/changelog.txt
 create mode 100644 plugin.video.twit/default.py
 create mode 100644 plugin.video.twit/icon.png
 create mode 100644 plugin.video.twit/resources/language/English/strings.xml
 create mode 100644 plugin.video.twit/resources/live.png
 create mode 100644 plugin.video.twit/resources/settings.xml


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to