The branch, frodo has been updated
       via  1b90916900b351802cff9c9c398ec28d68d208de (commit)
      from  9c6aaa2cf9535fcf73a357972da9a39d1c3fc3a9 (commit)

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

commit 1b90916900b351802cff9c9c398ec28d68d208de
Author: Martijn Kaijser <[email protected]>
Date:   Mon Dec 23 20:48:47 2013 +0100

    [script.artwork.downloader] 12.0.22

diff --git a/script.artwork.downloader/addon.xml 
b/script.artwork.downloader/addon.xml
index d250737..16017e3 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.21"
+    version="12.0.22"
     provider-name="Martijn"
     >
   <requires>
diff --git a/script.artwork.downloader/changelog.txt 
b/script.artwork.downloader/changelog.txt
index 30651f1..1013c35 100644
--- a/script.artwork.downloader/changelog.txt
+++ b/script.artwork.downloader/changelog.txt
@@ -1,120 +1,123 @@
-[B]12.0.21[/B]
+v12.0.22
+- Fix that some files where never found or downloaded
+
+v12.0.21
 - Fix change image url for TheMovieDB
 
-[B]12.0.20[/B]
+v12.0.20
 - Fix local scraping
 
-[B]12.0.19[/B]
+v12.0.19
 - Gracefully fail if a non library item is send to the script
 - Fix not downloading extrafanart any more
 - Correct local scraper behaviour
 - Catch edge cases where it can't get data from library
 - Fix skin calling methods
 
-[B]12.0.18[/B]
+v12.0.18
 - Fixed wrong variable
 
-[B]12.0.17[/B]
+v12.0.17
 - Fixed wrong filename for season landscape
 - Fixed extra slash for BDMV and VIDEO_TS
 
-[B]12.0.16[/B]
+v12.0.16
 - A lot of code cleanup
 - Updated language files from Transifex
 
-[B]12.0.15[/B]
+v12.0.15
 - Fixed custom mode
 - Added option to show image selection directly if type is specified
 
-[B]12.0.14[/B]
+v12.0.14
 - Fixed missing brackets
 
-[B]12.0.13[/B]
+v12.0.13
 - Add better support for local artwork: allow selection in gui mode and also 
scrape local artwork without a valid media id
 - Update language files
 
-[B]12.0.12[/B]
+v12.0.12
 - Update languages
 - Fix script error on some season artwork
 
-[B]12.0.10[/B]
+v12.0.10
 - Bump dependency versions to prevent being marked as broken
 
-[B]12.0.10[/B]
+v12.0.10
 - 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]
+v12.0.9
 - Fix wrong filename for season landscape
 - Remove old code
 
-[B]12.0.7[/B]
+v12.0.7
 - Change API url
 
-[B]12.0.6[/B]
+v12.0.6
 - Fix report on wrong setting combination
 - Enable some artwork by default
 - Change poster and banner filenaming to match Frodo
 
-[B]12.0.5[/B]
+v12.0.5
 - Force overwrite when using GUI mode
 
-[B]12.0.4[/B]
+v12.0.4
 - Directly add the image URL to the databse
 - Option to override with local file
 
-[B]12.0.1[/B]
+v12.0.1
 - Fix bulk downloading for a single movie/tvshow
 
-[B]12.0.0[/B]
+v12.0.0
 - XBMC12.0 Frodo version
 - use ListItem.DBID for matching media items
 - Depricate use of ListItem.Title and ListItem.Path
 - Remove db caching because it's not needed anymore
 
-[B]1.0.19[/B]
+v1.0.19
 - Add fix (again) for Frodo users
 
-[B]1.0.18[/B]
+v1.0.18
 - Add fix for Frodo users
 
-[B]1.0.17[/B]
+v1.0.17
 - Forgot to update settings.xml
 
-[B]1.0.16[/B]
+v1.0.16
 - Added: Movie Thumb
 - Added: Movie Banner
 - Added: HD artwork takes priority
 
-[B]1.0.15[/B]
+v1.0.15
 - Disable autorun
 - Disable fanart deletion and reduce max number of image
 
-[B]1.0.14[/B]
+v1.0.14
 - Fixed: Possible empty library list when there was no season data
 
-[B]1.0.13[/B]
+v1.0.13
 - Fixed: Forgot to remove test line
 
-[B]1.0.12[/B]
+v1.0.12
 - Fixed: Didn't cache empty results
 - Fixed: Should now also work for multipath://
 - Changed: Improved coding in some parts
 
-[B]1.0.11[/B]
+v1.0.11
 - Fixed: Image selection wasn't working when there was a username/password in 
source
 
-[B]1.0.10[/B]
+v1.0.10
 - Added: Korean translation (thx piodio)
 - Added: Debug option
 - Change: Code handling
 
-[B]1.0.9[/B]
+v1.0.9
 - Changed: increase the API cache expire time to stop trashing the fanart.tv 
site
 - Added: Only show artwork types in GUI mode that are avaiable
 - Fixed: Unicode error in custom/gui mode search
 
-[B]1.0.8[/B]
+v1.0.8
 - Added: Increased speed by using commingcache for library JSON when using 
custom/gui mode (expires after 1 hour)
 - Added: Greek translation (thx CutSickAss)
 - Added: Spanish translation (thx PatOso)
@@ -131,19 +134,19 @@
 - Changed: Switched to the new fanart.tv API
 - Changed: increase caching of API calls because provider data doesn't change 
that (24->48 hours)
 
-[B]1.0.7[/B] 
+v1.0.7 
 - Changed: Revert 1.0.6 because dependencies are now met. Meaning options from 
1.0.5 are now active
 - Fixed: Limit TMDB by rating not by number of votes
 
-[B]1.0.6[/B]
+v1.0.6
 
 - Fixed: Revert 1.0.5 because dependencies were not met yet
 
-[B]1.0.5[/B]
+v1.0.5
 - Added: Use commoncache module to decrease API load on providers
 - Added: TV Show seasonbanners "seasonx-banner.jpg"
 
-[B]1.0.4[/B]
+v1.0.4
 - Fixed: After doing ID conversion it skipped that movie
 - Fixed: Some mayor bug that no ones has noticed so far
 - Fixed: When no exact title match was found it downloaded the entire library
@@ -165,7 +168,7 @@
 - Added: Added musicvideo section that uses the title to search for artwork on 
TMDB
          Needs extra argument from skin (see runscript.txt)
 
-[B]1.0.3[/B]
+v1.0.3
 - Fixed: Error below limit check
 - Fixed: Custom download for specific movie artwork only
 - Fixed: Downloads artwork for selected movie when multiple exist with same 
name
@@ -173,7 +176,7 @@
 - Fixed: Did not run service when set to 00->09
 - Added: Try conversion of non standard IMDB Id
 
-[B]1.0.2[/B]
+v1.0.2
 - Added: Log summary on failed/missing items
 - Added: Support the providers message on finished
 - Added: Custom mode pops-up a image selection when run on single tvshow/movie
@@ -184,14 +187,14 @@
 - Fixed: Show correct download count in log
 - Fixed: Don't show dialog.OK when finished run in silent mode
 
-[B]1.0.1[/B]
+v1.0.1
 - Added: Ability for skinners to run a custom mode specifying artwork types
          see /resources/docs/runscript.txt
 - Fixed: Downloading logos in overwrite all mode
 - Fixed: Problems with folder creation for .rar media
 - Removed: Version/settings.xml check
 
-[B]1.0.0[/B]
+v1.0.0
 - Name change: Extrafanart Downloader -> Artwork Downloader
 - Fixed: Refactored JSON query to prevent reg-ex problems
 - Fixed: Total refactor on downloading and limiting
@@ -214,12 +217,12 @@
 - Added: 'silent=true' add-on start argument (displays notification on 
finished)
 - Added: Add-on can be run as service and at startup
 
-[B]0.4.1[/B]
+v0.4.1
 - Added: Extrathumbs support for Movies
 - Fixed: New TMDB image locations on site
          Advisable is to delete all existing movie extrafanart folders
 
-[B]0.4.0[/B]
+v0.4.0
 - Added: Silent downloading in background
 - Added: Extrafanart limiter (maximum fanart/language/no text) 
 - Added: Download backup folder for fanart
@@ -228,13 +231,13 @@
 - Added: Open Settings on first run
 - Updated: Skin integration examples
 
-[B]0.3.8[/B]
+v0.3.8
 - Added: option to centralize fanart storage
 - Splitting code into libraries
 
-[B]0.3.7[/B]
+v0.3.7
 - Added: Skin integration options (see readme file)
 
-[B]0.3.6[/B]
+v0.3.6
 - Initial commit
 - Initial version for official XBMC-repo
\ No newline at end of file
diff --git a/script.artwork.downloader/default.py 
b/script.artwork.downloader/default.py
index c238b18..7a7b8f2 100644
--- a/script.artwork.downloader/default.py
+++ b/script.artwork.downloader/default.py
@@ -311,9 +311,10 @@ class Main:
             currentmedia['extrathumbsdirs'] = extrathumbsdirs
             # this part check for local files when enabled
             scan_more = True
+            missing = False
             if setting['files_local']:
                 local_list = []
-                local_list, scan_more = local().get_image_list(currentmedia)
+                local_list, scan_more, missing = 
local().get_image_list(currentmedia)
                 # append local artwork
                 for item in local_list:
                     image_list.append(item)
@@ -334,9 +335,14 @@ class Main:
             elif currentmedia['mediatype'] == 'tvshow' and 
currentmedia['id'].startswith('tt'):
                 log('- IMDB ID found for TV show, skipping')
                 failed_items.append('[%s]: TVDB ID %s' %(currentmedia['name'], 
__localize__(32022)))
-
-            # If correct ID found continue
+            #skip scanning for more if local files have been found and not run 
in gui / custom mode
+            elif not scan_more and not startup['mode'] in ['gui', 'custom']:
+                log('- Already have all files local')
+                pass
+            # If correct ID found and don't already have all artwork retrieve 
from providers
             else:
+                log('- Still missing some files')
+                log(missing)
                 temp_image_list = []
                 # Run through all providers getting their imagelisting
                 failcount = 0
@@ -345,9 +351,6 @@ class Main:
                         break
                     artwork_result = ''
                     xmlfailcount = 0
-                    #skip skanning for more if local files have been found and 
not run in gui / custom mode
-                    if not scan_more and not startup['mode'] in ['gui', 
'custom']:
-                        artwork_result = 'pass'
                     while not artwork_result == 'pass' and not artwork_result 
== 'skipping':
                         if artwork_result == 'retrying':
                             xbmc.sleep(setting['api_timedelay'])
@@ -449,21 +452,6 @@ 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 setting['files_local'] and art_item['art_type'] in arttypes:
-                for targetdir in targetdirs:
-                    localfile = os.path.join(targetdir, 
art_item['filename']).encode('utf-8')
-                    if self.fileops._exists(localfile):
-                        final_image_list.append({'url': localfile,
-                                                 'art_type': 
[art_item['art_type']],
-                                                 'language': pref_language,
-                                                 'discnumber': '1',
-                                                 'disctype': 
currentmedia['disctype']})
-                    break
-            # End of hack
-
             # Do some language shit
             # loop two times than skip
             while (i < 2 and not imagefound):
@@ -575,9 +563,11 @@ class Main:
                                             if not 
self.fileops._exists(os.path.join(targetdir, item['filename'])):
                                                 missingfiles = True
                                     # Check if image already exist in database
-                                    elif (not art_item['art_type'] in 
['seasonlandscape','seasonbanner','seasonposter'] and not
-                                          artcheck.get(art_item['art_type'])):
-                                        missingfiles = True
+                                    elif not art_item['art_type'] in 
['seasonlandscape','seasonbanner','seasonposter']:
+                                        if setting['files_local']and not 
self.fileops._exists(item['localfilename']):
+                                            missingfiles = True
+                                        elif not 
artcheck.get(art_item['art_type']):
+                                            missingfiles = True
                                     if missingfiles:
                                         # If missing add to list
                                         imagefound = True
diff --git a/script.artwork.downloader/lib/apply_filters.py 
b/script.artwork.downloader/lib/apply_filters.py
index 66d8ad0..17e19cf 100644
--- a/script.artwork.downloader/lib/apply_filters.py
+++ b/script.artwork.downloader/lib/apply_filters.py
@@ -95,9 +95,9 @@ def fanart(data):
         reason = 'Has text'
         limited = True
     # Correct language
-    elif limit.get('limit_artwork') and not data.get('artwork')['language'] in 
[data.get('language'), 'n/a']:
-        reason = "Doesn't match preferred language: %s" % 
limit.get('limit_preferred_language')
-        limited = True
+    #elif limit.get('limit_artwork') and not data.get('artwork')['language'] 
in [data.get('language'), 'n/a']:
+    #    reason = "Doesn't match preferred language: %s" % 
limit.get('limit_preferred_language')
+    #    limited = True
     return [limited, reason]
     
 def extrafanart(data):
diff --git a/script.artwork.downloader/lib/provider/local.py 
b/script.artwork.downloader/lib/provider/local.py
index 277d1b1..9fe7605 100644
--- a/script.artwork.downloader/lib/provider/local.py
+++ b/script.artwork.downloader/lib/provider/local.py
@@ -39,6 +39,7 @@ limit = get_limit()
 class local():
     def get_image_list(self,media_item):
         image_list = []
+        missing =[]
         file_list = xbmcvfs.listdir(media_item['artworkdir'][0])
         ### Processes the bulk mode downloading of files
         i = 0 # needed
@@ -56,6 +57,8 @@ class local():
                         #log('extrafanart found: 
%s'%len(extrafanart_file_list[1]))
                         if len(extrafanart_file_list[1]) >= 
limit.get('limit_extrafanart_max'):
                             j += 1
+                        else:
+                            missing.append(item['art_type'])
 
                 elif item['art_type'] == 'extrathumbs':
                     extrathumbs_file_list = ''
@@ -65,6 +68,8 @@ class local():
                         #log('extrathumbs found: 
%s'%len(extrathumbs_file_list[1]))
                         if len(extrathumbs_file_list[1]) >= 
limit.get('limit_extrathumbs_max'):
                             j += 1
+                        else:
+                            missing.append(item['art_type'])
 
                 elif item['art_type'] in ['seasonposter']:
                     for season in media_item['seasons']:
@@ -74,6 +79,7 @@ class local():
                             filename = "season-all-poster.jpg"
                         else:
                             filename = (item['filename'] % int(season))
+                        #log ('finding: %s'%filename)
                         if filename in file_list[1]:
                             url = os.path.join(media_item['artworkdir'][0], 
filename).encode('utf-8')
                             j += 1
@@ -93,7 +99,7 @@ class local():
                                                'votes': '0',
                                                'generalinfo': generalinfo})
                         else:
-                            pass
+                            missing.append(filename)
 
                 elif item['art_type'] in ['seasonbanner']:
                     for season in media_item['seasons']:
@@ -103,6 +109,7 @@ class local():
                             filename = "season-all-banner.jpg"
                         else:
                             filename = (item['filename'] % int(season))
+                        #log ('finding: %s'%filename)
                         if filename in file_list[1]:
                             url = os.path.join(media_item['artworkdir'][0], 
filename).encode('utf-8')
                             j += 1
@@ -122,7 +129,7 @@ class local():
                                                'votes': '0',
                                                'generalinfo': generalinfo})
                         else:
-                            pass
+                            missing.append(filename)
 
                 elif item['art_type'] in ['seasonlandscape']:
                     for season in media_item['seasons']:
@@ -130,6 +137,7 @@ class local():
                             filename = "season-all-landscape.jpg"
                         else:
                             filename = (item['filename'] % int(season))
+                        #log ('finding: %s'%filename) 
                         if filename in file_list[1]:
                             url = os.path.join(media_item['artworkdir'][0], 
filename).encode('utf-8')
                             j += 1
@@ -149,10 +157,11 @@ class local():
                                                'votes': '0',
                                                'generalinfo': generalinfo})
                         else:
-                            pass
+                            missing.append(filename)
 
                 else:
                     filename = item['filename']
+                    #log ('finding: %s'%filename)
                     if filename in file_list[1]:
                         url = os.path.join(media_item['artworkdir'][0], 
filename).encode('utf-8')
                         j += 1
@@ -170,6 +179,8 @@ class local():
                                            'language': 'EN',
                                            'votes': '0',
                                            'generalinfo': generalinfo})
+                    else:
+                        missing.append(filename)
         #log('total local types needed: %s'%i)
         #log('total local types found:  %s'%j)
         if j < i:
@@ -179,10 +190,10 @@ class local():
             #log('don''t scan for more')
             scan_more = False
         if image_list == []:
-            return image_list, scan_more
+            return image_list, scan_more, missing
         else:
             # Sort the list before return. Last sort method is primary
             image_list = sorted(image_list, key=itemgetter('votes'), 
reverse=True)
             image_list = sorted(image_list, key=itemgetter('size'), 
reverse=False)
             image_list = sorted(image_list, key=itemgetter('language'))
-            return image_list, scan_more
\ No newline at end of file
+            return image_list, scan_more, missing
\ No newline at end of file

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

Summary of changes:
 script.artwork.downloader/addon.xml             |    2 +-
 script.artwork.downloader/changelog.txt         |   91 ++++++++++++-----------
 script.artwork.downloader/default.py            |   38 ++++------
 script.artwork.downloader/lib/apply_filters.py  |    6 +-
 script.artwork.downloader/lib/provider/local.py |   21 ++++-
 5 files changed, 81 insertions(+), 77 deletions(-)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to