The branch, frodo has been updated
       via  218f2191470b611e45b2c3aa58a8dbbaecb05729 (commit)
      from  f9634f3522add9ad0ef7998481de8e53b54e3fcb (commit)

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

commit 218f2191470b611e45b2c3aa58a8dbbaecb05729
Author: Martijn Kaijser <[email protected]>
Date:   Fri Nov 30 21:23:07 2012 +0100

    [script.artwork.downloader] -v12.0.10

diff --git a/script.artwork.downloader/addon.xml 
b/script.artwork.downloader/addon.xml
index 2839d44..c9e1e2c 100644
--- a/script.artwork.downloader/addon.xml
+++ b/script.artwork.downloader/addon.xml
@@ -2,7 +2,7 @@
 <addon
        id="script.artwork.downloader"
        name="Artwork Downloader"
-       version="12.0.9"
+       version="12.0.10"
        provider-name="Martijn"
     >
   <requires>
diff --git a/script.artwork.downloader/changelog.txt 
b/script.artwork.downloader/changelog.txt
index 3d2861e..d3e97ac 100644
--- a/script.artwork.downloader/changelog.txt
+++ b/script.artwork.downloader/changelog.txt
@@ -1,3 +1,7 @@
+[B]12.0.10[/B]
+- Fixed correct check on season artwork so it isn't downloaded again and again
+- Added quick hack to support local artwork if nothing present on fanart.tv
+
 [B]12.0.9[/B]
 - Fix wrong filename for season landscape
 - Remove old code
diff --git a/script.artwork.downloader/default.py 
b/script.artwork.downloader/default.py
index 3a98bc4..fe3d3a6 100644
--- a/script.artwork.downloader/default.py
+++ b/script.artwork.downloader/default.py
@@ -446,6 +446,7 @@ class Main:
         i = 0                                   # Set loop counter
         imagefound = False                      # Set found image false
         imageignore = False                     # Set ignaore image false
+        missingfiles = False
         final_image_list = []
         if self.mode in ['gui', 'customgui'] and not art_type in 
['extrafanart', 'extrathumbs']:
             final_image_list.append(self.image_item)
@@ -454,6 +455,21 @@ class Main:
         if len(final_image_list) == 0:
             log(' - Nothing to download')
         else:
+            # This total hack adds temporary ability to use local images that 
are not on fanart.tv
+            # This should be removed asap when rewrite is done
+            arttypes = ['clearlogo','clearart','landscape','discart']
+            if self.settings.files_local and art_type in arttypes:
+                for targetdir in targetdirs:
+                    localfile = os.path.join(targetdir, 
filename).encode('utf-8')
+                    if self.fileops._exists(localfile):
+                        final_image_list.append({'url': localfile,
+                                                 'type': [art_type],
+                                                 'language': pref_language,
+                                                 'discnumber': '1',
+                                                 'disctype': 
self.media_item['disctype']})
+                    break
+            # End of hack
+
             # Do some language shit
             # loop two times than skip
             while (i < 2 and not imagefound):
@@ -480,7 +496,6 @@ class Main:
                                 'dbid':self.media_item['dbid'],
                                 'art':self.media_item['art'],
                                 'arttype':art_type}
-
                         # raise artwork counter only on first loop
                         if i != 1:
                             current_artwork += 1
@@ -522,7 +537,6 @@ class Main:
                             # jump out of the loop
                             imagefound = True
                         else:
-
                             # Check for set limits
                             if art_type == 'discart':
                                 limited = self.filters.do_filter(art_type, 
self.mediatype, item['artwork_details'], limit_counter, pref_language, 
self.media_item['disctype'])
@@ -538,22 +552,20 @@ class Main:
                                 imageignore = True
                                 log(' - Ignoring (%s): %s' % (limited[1], 
item['filename']))
                             else:
-                                imageignore = False
                                 # Always add to list when set to overwrite
                                 if self.settings.files_overwrite:
                                     log(' - Adding to download list (overwrite 
enabled): %s' % item['filename'])
                                     self.download_list.append(item)
                                     imagefound = True
                                 else:
-                                    # Check if image already exist local
-                                    missingfiles = False
                                     artcheck = item['art']
+                                    # Check if extrathumbs/extrafanart image 
already exist local
                                     if art_type in 
['extrathumbs','extrafanart']:
                                         for targetdir in item['targetdirs']:
                                             if not 
self.fileops._exists(os.path.join(targetdir, item['filename'])):
                                                 missingfiles = True
                                     # Check if image already exist in database
-                                    elif not artcheck.get(art_type):
+                                    elif not art_type 
in['seasonlandscape','seasonbanner','seasonposter'] and not 
artcheck.get(art_type):
                                         missingfiles = True
                                     if missingfiles:
                                         # If missing add to list
@@ -571,7 +583,7 @@ class Main:
                                         if not 
self.fileops._exists(os.path.join (targetdir, item['filename'])) and not 
art_type in ['extrafanart', 'extrathumbs']:
                                             self.failed_items.append('[%s] %s 
%s' % (self.media_item['name'], art_type, __localize__(32147)))
                             # Do some special check on season artwork
-                            if art_type == 'seasonthumbs' or art_type == 
'seasonbanner' or art_type   == 'seasonposter':
+                            if art_type == 'seasonlandscape' or art_type == 
'seasonbanner' or art_type   == 'seasonposter':
                                 # If already present in list set limit on 1 so 
it is skipped
                                 limit_counter = 0
                                 if artwork['season'] in seasonfile_presents:
diff --git a/script.artwork.downloader/resources/lib/apply_filters.py 
b/script.artwork.downloader/resources/lib/apply_filters.py
index f1cb21a..a0dcfe6 100644
--- a/script.artwork.downloader/resources/lib/apply_filters.py
+++ b/script.artwork.downloader/resources/lib/apply_filters.py
@@ -44,11 +44,11 @@ class apply_filters:
         elif art_type == 'characterart':
             return self.characterart(mediatype, artwork, downloaded_artwork, 
language)
 
-        elif art_type == 'tvthumb':
-            return self.tvthumb(mediatype, artwork, downloaded_artwork, 
language)
+        elif art_type == 'landscape':
+            return self.landscape(mediatype, artwork, downloaded_artwork, 
language)
 
-        elif art_type == 'seasonthumbs':
-            return self.seasonthumbs(mediatype, artwork, downloaded_artwork, 
language)
+        elif art_type == 'seasonlandscape':
+            return self.seasonlandscape(mediatype, artwork, 
downloaded_artwork, language)
 
         elif art_type == 'defaultthumb':
             return self.defaultthumb(mediatype, artwork, downloaded_artwork, 
language)
@@ -223,12 +223,12 @@ class apply_filters:
             limited = True
         return [limited, reason]
         
-    def tvthumb(self, mediatype, artwork, downloaded_artwork, language):
+    def landscape(self, mediatype, artwork, downloaded_artwork, language):
         limited = False
         reason = ''
         # Maximum number
         if downloaded_artwork >= self.settings.limit_artwork_max:
-            reason = 'Max number tvthumb reached: %s' % 
self.settings.limit_artwork_max
+            reason = 'Max number landscape reached: %s' % 
self.settings.limit_artwork_max
             limited = True
         # Correct language
         elif self.settings.limit_artwork and not artwork['language'] in [ 
language, 'n/a' ]:
@@ -236,7 +236,7 @@ class apply_filters:
             limited = True
         return [limited, reason]
         
-    def seasonthumbs(self, mediatype, artwork, downloaded_artwork, language):
+    def seasonlandscape(self, mediatype, artwork, downloaded_artwork, 
language):
         limited = False
         reason = ''
         # Maximum number

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

Summary of changes:
 script.artwork.downloader/addon.xml                |    2 +-
 script.artwork.downloader/changelog.txt            |    4 +++
 script.artwork.downloader/default.py               |   26 ++++++++++++++-----
 .../resources/lib/apply_filters.py                 |   14 +++++-----
 4 files changed, 31 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
TUNE You got it built. Now make it sing. Tune shows you how.
http://goparallel.sourceforge.net
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to