The branch, dharma has been updated
       via  f5765c7fc69560f93b81adf361faf19a1159a212 (commit)
      from  fb66eb40f868f84e3c16cf28b053b2d608c9a537 (commit)

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

commit f5765c7fc69560f93b81adf361faf19a1159a212
Author: spiff <[email protected]>
Date:   Wed Aug 29 17:30:21 2012 +0200

    [plugin.video.diy] updated to version 0.0.4

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

 <addon id="plugin.video.diy"

        name="DIY Network"

-       version="0.0.3"

+       version="0.0.4"

        provider-name="divingmule">

   <requires>

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

@@ -14,7 +14,6 @@
   <extension point="xbmc.addon.metadata">

     <summary>Videos from diynetwork.com.</summary>

     <description>Play full episodes from the Do It Yourself Network, 
diynetwork.com. These videos seem to be restricted to the U.S. 
only.</description>

-    <disclaimer>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>

   </extension>

 </addon>

diff --git a/plugin.video.diy/changelog.txt b/plugin.video.diy/changelog.txt
index bd2b76a..d658d50 100644
--- a/plugin.video.diy/changelog.txt
+++ b/plugin.video.diy/changelog.txt
@@ -1,3 +1,6 @@
+Version 0.0.4

+fix script error when selecting some shows

+

 Version 0.0.3

 we now scrape the main show list from 
http://www.diynetwork.com/full-episodes/package/index.html and then hard-code 
other shows in the 'More' directory.

 

diff --git a/plugin.video.diy/default.py b/plugin.video.diy/default.py
index 7de0d11..c76fae3 100644
--- a/plugin.video.diy/default.py
+++ b/plugin.video.diy/default.py
@@ -14,11 +14,19 @@ icon = xbmc.translatePath( os.path.join( home, 'icon.png' ) 
)
 def getRequest(url):

         headers = {'User-agent' : '    Mozilla/5.0 (Windows NT 6.1; WOW64; 
rv:10.0) Gecko/20100101 Firefox/10.0',

                    'Referer' : 'http://www.diynetwork.com'}

-        req = urllib2.Request(url,None,headers)

-        response = urllib2.urlopen(req)

-        link=response.read()

-        response.close()

-        return link

+        try:

+            req = urllib2.Request(url,None,headers)

+            response = urllib2.urlopen(req)

+            data = response.read()

+            response.close()

+            return data

+        except urllib2.URLError, e:

+            print 'We failed to open "%s".' % url

+            if hasattr(e, 'reason'):

+                print 'We failed to reach a server.'

+                print 'Reason: ', e.reason

+            if hasattr(e, 'code'):

+                print 'We failed with error code - %s.' % e.code

 

 

 def getShows():

@@ -63,7 +71,8 @@ def getMoreShows():
 

 

 def index(url, iconimage):

-        url='http://www.diynetwork.com'+url

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

+            url = 'http://www.diynetwork.com'+url

         soup = BeautifulSoup(getRequest(url))

         if soup.find('div', attrs={'id' : "more-videos-from-show"}):

             shows = soup.find('div', attrs={'id' : 
"more-videos-from-show"})('h4')


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

Summary of changes:
 plugin.video.diy/addon.xml     |    3 +--
 plugin.video.diy/changelog.txt |    3 +++
 plugin.video.diy/default.py    |   21 +++++++++++++++------
 3 files changed, 19 insertions(+), 8 deletions(-)


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