The branch, dharma-pre has been updated
       via  d5c6c98749764939280109c2a7e8dac8c4812695 (commit)
      from  cb193a2dfec02ceaa0b1705cf47241032ff307a6 (commit)

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

commit d5c6c98749764939280109c2a7e8dac8c4812695
Author: Zeljko Ametovic <[email protected]>
Date:   Mon Oct 11 10:39:59 2010 +0400

    [script.logo-downloader]
    v2.1.3
    - corrections for users with python 2.5 - thanks to Anssi(xbmc.org)
    v2.1.2
    - correction for nvfo change, now search for <tvdbid> and <id>.
    - add "no tvdb id found"

diff --git a/script.logo-downloader/addon.xml b/script.logo-downloader/addon.xml
index 1442201..851ef7a 100644
--- a/script.logo-downloader/addon.xml
+++ b/script.logo-downloader/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="script.logo-downloader"
        name="Logo Downloader"
-       version="2.1.1"
+       version="2.1.3"
        provider-name="ppic">
   <requires>
     <import addon="xbmc.python" version="1.0"/>
diff --git a/script.logo-downloader/changelog.txt 
b/script.logo-downloader/changelog.txt
index b9f1810..5f6d3a9 100644
--- a/script.logo-downloader/changelog.txt
+++ b/script.logo-downloader/changelog.txt
@@ -1,3 +1,10 @@
+v2.1.3
+- corrections for users with python 2.5 - thanks to Anssi(xbmc.org)
+
+v2.1.2
+- correction for nvfo change, now search for <tvdbid> and <id>.
+- add "no tvdb id found"
+
 v2.1.1
 - correct type of image selection.
 - add scan canceling
diff --git a/script.logo-downloader/default.py 
b/script.logo-downloader/default.py
index 25e72e4..845aab8 100644
--- a/script.logo-downloader/default.py
+++ b/script.logo-downloader/default.py
@@ -1,11 +1,13 @@
+# -*- coding: utf-8 -*-

+

 __script__       = "Logo Downloader"

 __author__       = "Ppic"

 __url__          = "http://code.google.com/p/passion-xbmc/";

 __svn_url__      = ""

 __credits__      = "Team XBMC PASSION, http://passion-xbmc.org/";

 __platform__     = "xbmc media center, [LINUX, OS X, WIN32, XBOX]"

-__date__         = "02-10-2010"

-__version__      = "2.1.1"

+__date__         = "11-10-2010"

+__version__      = "2.1.3"

 __svn_revision__  = "$Revision: 000 $"

 __XBMC_Revision__ = "30000" #XBMC Babylon

 __useragent__ = "Logo downloader %s" % __version__

@@ -130,31 +132,33 @@ class downloader:
     def solo_mode(self):

         self.get_tvid_path()

         self.id_verif()

-        self.type_list = []

-        if self.logo:self.type_list.append ("logo")

-        if self.clearart:self.type_list.append ("clearart")

-        if self.show_thumb:self.type_list.append ("showthumb")

-        

-        if self.choice_type():

-            self.image_list = False

-            if self.logo:

-                self.filename = "logo.png"

-                self.get_lockstock_xml()

-                self.search_logo()

-            elif self.clearart: 

-                self.filename = "clearart.png"

-                self.get_xbmcstuff_xml()

-                self.search_clearart()

-            elif self.show_thumb:

-                self.filename = "folder.jpg"

-                self.get_xbmcstuff_xml()

-                self.search_show_thumb()

+        if self.tvdbid:

+            self.type_list = []

+            if self.logo:self.type_list.append ("logo")

+            if self.clearart:self.type_list.append ("clearart")

+            if self.show_thumb:self.type_list.append ("showthumb")

             

-            if self.image_list: 

-                if self.choose_image(): 

-                    if DEBUG: self.print_class_var()

-                    if self.download_image(): xbmcgui.Dialog().ok("Success" , 
"Download successfull" )

-                    else: xbmcgui.Dialog().ok("Error" , "Error downloading 
file" )

+            if self.choice_type():

+                self.image_list = False

+                if self.logo:

+                    self.filename = "logo.png"

+                    self.get_lockstock_xml()

+                    self.search_logo()

+                elif self.clearart: 

+                    self.filename = "clearart.png"

+                    self.get_xbmcstuff_xml()

+                    self.search_clearart()

+                elif self.show_thumb:

+                    self.filename = "folder.jpg"

+                    self.get_xbmcstuff_xml()

+                    self.search_show_thumb()

+                

+                if self.image_list: 

+                    if self.choose_image(): 

+                        if DEBUG: self.print_class_var()

+                        if self.download_image(): 
xbmcgui.Dialog().ok("Success" , "Download successfull" )

+                        else: xbmcgui.Dialog().ok("Error" , "Error downloading 
file" )

+        else: xbmcgui.Dialog().ok("ERROR" , "no tvdb id found !" )

             

     def bulk_mode(self):

         if DEBUG: print "### get tvshow list"

@@ -327,14 +331,17 @@ class downloader:
             try: self.tvdbid = self.get_nfo_id()

             except:  

                 self.tvdbid = False              

-                print "### Error checking for nfo: %stvshow.nfo" % 
self.show_path.replace("\\\\" , "\\").encode("utf-8")

+                print "### Error checking for nfo: %stvshow.nfo" % 
self.show_path.replace("\\\\" , "\\")

                 print_exc()

                 

     def get_nfo_id( self ):

         nfo= os.path.join(self.show_path , "tvshow.nfo")

         print "### nfo file: %s" % nfo

-        nfo_read = file(repr(nfo).strip("u'\""), "r" ).read()

-        tvdb_id = re.findall( "<tvdbid>(\d{1,10})</tvdbid>", nfo_read )

+        if os.path.isfile(nfo): 

+            nfo_read = file(nfo, "r" ).read()

+            print nfo_read

+        else: print "###tvshow.nfo not found !"

+        tvdb_id = re.findall( "<tvdbid>(\d{1,10})</tvdbid>", nfo_read ) or 
re.findall( "<id>(\d{1,10})</id>", nfo_read )

         if tvdb_id: 

             print "### tvdb id: %s" % tvdb_id[0]

             return tvdb_id[0]

@@ -344,6 +351,7 @@ class downloader:
     

     def get_lockstock_xml(self):

         self.lockstock_xml = get_html_source( 
"http://www.lockstockmods.net/logos/getlogo.php?id="; + self.tvdbid )

+        if DEBUG: print self.lockstock_xml

     

     def get_xbmcstuff_xml(self):

         self.xbmcstuff_xml = get_html_source 
("http://www.xbmcstuff.com/tv_scraper.php?&id_scraper=p7iuVTQXQWGyWXPS&size=big&thetvdb=";
 + self.tvdbid )

diff --git a/script.logo-downloader/resources/lib/file_item.py 
b/script.logo-downloader/resources/lib/file_item.py
index 88f0dae..3422f20 100644
--- a/script.logo-downloader/resources/lib/file_item.py
+++ b/script.logo-downloader/resources/lib/file_item.py
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
+
 """
 XBMC Cached Thumbnails, based on file 'XBMC/xbmc/FileItem.cpp'
 by Frost
@@ -8,7 +10,7 @@ thumbnails = Thumbnails()
 
 print thumbnails.get_cached_artist_thumb( "artist name" )
 print thumbnails.get_cached_profile_thumb() # current profile thumb
-print thumbnails.get_cached_season_thumb( "F:\serietv\csi\Spécial" )
+print thumbnails.get_cached_season_thumb( "F:\serietv\csi\Spécial" )
 print thumbnails.get_cached_actor_thumb( "actor name" )
 print thumbnails.get_cached_picture_thumb( "full Path" )
 print thumbnails.get_cached_video_thumb( "full Path" )
@@ -96,4 +98,4 @@ if ( __name__ == "__main__" ):
     thumbnails = Thumbnails()
     print thumbnails.get_cached_script_thumb( "Calculator" )
     print thumbnails.get_cached_plugin_thumbs( "video", "passion-xbmc nfo 
creator" )# default and folder thumbs
-    print thumbnails.get_cached_season_thumb( "F:\serietv\csi\Spécial" )
+    print thumbnails.get_cached_season_thumb( "F:\serietv\csi\Spécial" )

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

Summary of changes:
 script.logo-downloader/addon.xml                  |    2 +-
 script.logo-downloader/changelog.txt              |    7 ++
 script.logo-downloader/default.py                 |   66 ++++++++++++---------
 script.logo-downloader/resources/lib/file_item.py |    6 +-
 4 files changed, 49 insertions(+), 32 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to