The branch, eden has been updated
       via  809ce416ed7b69b1b531aad3119071c7203f60d9 (commit)
      from  cd4754f20e2cc7049493c72a8b780026b61374ae (commit)

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

commit 809ce416ed7b69b1b531aad3119071c7203f60d9
Author: ronie <[email protected]>
Date:   Tue Mar 6 22:14:09 2012 +0100

    [script.artistslideshow] -v1.3.0
    
    experimental support for external scripts

diff --git a/script.artistslideshow/README.txt 
b/script.artistslideshow/README.txt
index aad07f3..7aba824 100644
--- a/script.artistslideshow/README.txt
+++ b/script.artistslideshow/README.txt
@@ -1,114 +1,19 @@
------How to use this addon:
-
-You must have a compatible skin (or update your skin using the instructions 
below).
-
-There are three groupings of settings: Download, Slideshow, and Advanced.
-
-Download
--Download images from last.fm (default true)
- (self expanitory)
--Download images from htbackdrops.com (default false)
- (self expanitory)
--Minimal image width and height: (default 0,0)
- any images smaller than the set dimensions will not be downloaded.
--Download only 16:9 images: (default false)
- will discard any images that aren't really, really close to a 16:9 aspect 
ratio.
--Download additional artist info: (default false)
- includes information like the artist's bio and artists similar to the one to 
which you are
- listening.  includes option to select download language.  skin must support 
this extra
- information, or nothing will be displayed.
-
-Slideshow
--Local artist folder: (default none)
- path to a directory that has artist images.  Images must be organized in 
artist/extrafanart/
--Fallback slideshow folder: (default none)
- path to a directory of images that should be used if no local or remote 
images can be found.
--Priority: (default remote first)
- three options: remote first, local first, both
-  remote first will try and download images from remote sites.  if none found 
will use local
-  images. if none found will use fallback slideshow
-  local first will use local images.  if none found will try and download 
remote images. if none
-  found will use fallback slideshow
-  both will check for local images first.  if they exist the downloaded images 
will be placed in
-  the same directory as the local images.  if not remote images will be stored 
in normal cache dir.
--Override slideshow folder: (default none)
- path to a directory of images that should be used intead of artist artwork. 
With this set no
- artwork will ever be downloaded.
--Refresh slideshow before all downloads complete: (default false)
- by default the add-on shows the first image downloaded and then doesn't show 
anymore until the
- all the downloads are done. if set to true, the slideshow will refresh after 
every x seconds
- instead of after all the images are downloaded.
--Minimum time between refresh: (default 20)
- if the above setting is enabled, this allows the user to change the period of 
time between
- refreshes of the image directory during downloads
- 
-Advanced
--Limit size of download cache: (default false)
- if enabled, the download cache will be trimmed (oldest first) to keep the 
size below the specified
- minimum
--Maximum cache size (in megabytes): (default 256)
- if Limit size of download cache is set to true, this allows the user to 
specify the maximum size
- of the cache
-
-
------How to use this addon in your skin:
-
-In MusicVisualisation.xml:
-
-- 1) Set the default control to 999:
-<defaultcontrol>999</defaultcontrol>
-
-- 2) Add a button to start the script:
-<control type="button" id="999">
-       <posx>-10</posx>
-       <posy>-10</posy>
-       <width>1</width>
-       <height>1</height>
-       <onfocus>RunScript(script.artistslideshow)</onfocus>
-</control>
-
-- 3) Add a multiimage conrol:
-<control type="multiimage">
-       <posx>0</posx>
-       <posy>0</posy>
-       <width>1280</width>
-       <height>720</height>
-       <imagepath 
background="true">$INFO[Window(Visualisation).Property(ArtistSlideshow)]</imagepath>
-       <aspectratio>keep</aspectratio>
-       <timeperimage>5000</timeperimage>
-       <fadetime>2000</fadetime>
-       <randomize>true</randomize>
-       <animation effect="fade" start="0" end="100" 
time="300">Visible</animation>
-       <animation effect="fade" start="100" end="0" 
time="300">Hidden</animation>
-</control>
-
-
-You can also start this script at startup instead:
-- RunScript(script.artistslideshow,daemon=True)
-this will keep the script running all the time.
-
-
-The script provides these properties to the skin:
-
-Window(Visualisation).Property(ArtistSlideshow)
- This is the path to the directory containing the downloaded images for the 
currently playing
- artist
-
-Window(Visualisation).Property(ArtistSlideshowRefresh)
- DEPRECIATED.  No longer needed as of version 1.2
- There is no harm if you leave it in the skin, but you should remove it when 
you have a chance.
-
-Window(Visualisation).Property(ArtistSlideshowRunning)
- This one is used internally by the script to check if it is already running.
- There's no need to use this property in your skin.
-
-Window(Visualisation).Property(ArtistSlideshow.ArtistBiography)
- Artist biography from last.fm
-
-Window(Visualisation).Property(ArtistSlideshow.%d.SimilarName)
-Window(Visualisation).Property(ArtistSlideshow.%d.SimilarThumb)
- Similar artists
-
-Window(Visualisation).Property(ArtistSlideshow.%d.AlbumName)
-Window(Visualisation).Property(ArtistSlideshow.%d.AlbumThumb)
- Albums by the artist
\ No newline at end of file
+Artist Slideshow Features
+displays slideshow as background for music visualization (must use a 
compatible skin or update skin
+using the instructions below)
+  option to have artist images downloaded and/or use a local directory of 
artist images
+  option for a fallback slideshow if no local or remote images are found
+  option to have a single slideshow displayed regardless of artist playing
+downloads artwork from htbackdrops.com and/or last.fm to display as background 
for music
+visualization
+  option to download artist bio and other additional information (skin must 
support display of this
+  information)
+  option to download only images larger than a given length and width
+  option to download only images with 16:9 aspect ratio
+  option to limit size of download cache
+support for internet streams that put the artist name in the XBMC title field 
(experimental)
+support for other addons using Artist Slideshow to provide the background 
(experimental)
+
+For a detailed description of options as well as instructions for skin and 
addon integration, see:
+
+  http://wiki.xbmc.org/index.php?title=Add-on:Artist_Slideshow
\ No newline at end of file
diff --git a/script.artistslideshow/addon.xml b/script.artistslideshow/addon.xml
index 1097af9..c66ddc0 100644
--- a/script.artistslideshow/addon.xml
+++ b/script.artistslideshow/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.artistslideshow" name="Artist Slideshow" version="1.2.0" 
provider-name="ronie/kyleejohnson (pkscuot)">
+<addon id="script.artistslideshow" name="Artist Slideshow" version="1.3.0" 
provider-name="ronie/kyleejohnson (pkscuot)">
        <requires>
                <import addon="xbmc.python" version="2.0"/>
                <import addon="script.module.elementtree" version="1.2.7"/>
diff --git a/script.artistslideshow/changelog.txt 
b/script.artistslideshow/changelog.txt
index 273ae7a..1e88edf 100644
--- a/script.artistslideshow/changelog.txt
+++ b/script.artistslideshow/changelog.txt
@@ -1,3 +1,12 @@
+v1.3.0
+- updated refresh during download logic to make it more aesthetically pleasing
+- refresh during downloads is now the default (and non-optional) behavior
+- removed option to change refresh timing
+- new cache manager (removes only files, not directories)
+- added one additional (smaller) option for cache size
+- experimental support for external scripts using artistslideshow
+- experimental support for internet streams
+
 v1.2.0
 - added ability to use local or remote images
 - added priority image control to use local first, remote first, or both
diff --git a/script.artistslideshow/default.py 
b/script.artistslideshow/default.py
index 5e87d4c..5ca1f83 100644
--- a/script.artistslideshow/default.py
+++ b/script.artistslideshow/default.py
@@ -93,13 +93,16 @@ def cleanText(text):
     text = re.sub('User-contributed text is available under the Creative 
Commons By-SA License and may also be available under the GNU FDL.','',text)
     return text.strip()
         
-def download(src, dst):
+def download(src, dst, dst2):
     if (not xbmc.abortRequested):
         tmpname = xbmc.translatePath('special://profile/addon_data/%s/temp/%s' 
% ( __addonname__ , xbmc.getCacheThumbName(src) ))
         if xbmcvfs.exists(tmpname):
             xbmcvfs.delete(tmpname)
         urllib.urlretrieve(src, tmpname)
         if os.path.getsize(tmpname) > 999:
+            log( 'copying file to transition directory' )
+            xbmcvfs.copy(tmpname, dst2)
+            log( 'moving file to cache directory' )
             xbmcvfs.rename(tmpname, dst)
         else:
             xbmcvfs.delete(tmpname)
@@ -110,14 +113,14 @@ class Main:
         self._get_settings()
         self._init_vars()
         self._make_dirs()
-        if xbmc.getInfoLabel( "Window(12006).Property(ArtistSlideshowRunning)" 
) == "True":
+        if xbmc.getInfoLabel( self.ARTISTSLIDESHOWRUNNING ) == "True":
             log('script already running')
         else:
             self.LastCacheTrim = 0
             self.WINDOW.setProperty("ArtistSlideshowRunning", "True")
-            if xbmc.Player().isPlayingAudio() == False:
+            if( xbmc.Player().isPlayingAudio() == False and xbmc.getInfoLabel( 
self.EXTERNALCALL ) == '' ):
                 log('no music playing')
-                if self.DAEMON == "False":
+                if( self.DAEMON == "False" ):
                     self.WINDOW.clearProperty("ArtistSlideshowRunning")
             elif(not self.OVERRIDEPATH == ''):
                 self.WINDOW.setProperty("ArtistSlideshow", self.OVERRIDEPATH)
@@ -128,10 +131,9 @@ class Main:
                 self._trim_cache()
             while (not xbmc.abortRequested and self.OVERRIDEPATH == ''):
                 time.sleep(0.5)
-                if xbmc.getInfoLabel( 
"Window(12006).Property(ArtistSlideshowRunning)" ) == "True":
-                    if xbmc.Player().isPlayingAudio() == True:
-                        currentname = 
xbmc.Player().getMusicInfoTag().getArtist()
-                        if self.NAME != currentname:
+                if xbmc.getInfoLabel( self.ARTISTSLIDESHOWRUNNING ) == "True":
+                    if( xbmc.Player().isPlayingAudio() == True or 
xbmc.getInfoLabel( self.EXTERNALCALL ) != '' ):
+                        if self.NAME != self._get_current_artist():
                             self._clear_properties()
                             self.UsingFallback = False
                             self._use_correct_artwork()
@@ -142,8 +144,8 @@ class Main:
                                 self._use_correct_artwork()
                     else:
                         time.sleep(1) # doublecheck if playback really stopped
-                        if xbmc.Player().isPlayingAudio() == False:
-                            if self.DAEMON == "False":
+                        if( xbmc.Player().isPlayingAudio() == False and 
xbmc.getInfoLabel( self.EXTERNALCALL ) == '' ):
+                            if ( self.DAEMON == "False" ):
                                 
self.WINDOW.clearProperty("ArtistSlideshowRunning")
                 else:
                     self._clear_properties()
@@ -172,7 +174,7 @@ class Main:
         if(not (self.LocalImagesFound or self.CachedImagesFound or 
self.ImageDownloaded)):
             if (not self.FALLBACKPATH == ''):
                 log('no images found for artist, using fallback slideshow')
-                log('fallbackdir = ' +self.FALLBACKPATH)
+                log('fallbackdir = ' + self.FALLBACKPATH)
                 self.UsingFallback = True
                 self.WINDOW.setProperty("ArtistSlideshow", self.FALLBACKPATH)  
                          
 
@@ -182,6 +184,10 @@ class Main:
             params = dict( arg.split( "=" ) for arg in sys.argv[ 1 ].split( 
"&" ) )
         except:
             params = {}
+        self.WINDOWID = params.get( "windowid", "12006")
+        log( 'window id is set to %s' % self.WINDOWID )
+        self.ARTISTFIELD = params.get( "artistfield", "" )
+        log( 'artist field is set to %s' % self.ARTISTFIELD )
         self.DAEMON = params.get( "daemon", "False" )
         if self.DAEMON == "True":
             log('daemonizing')
@@ -210,11 +216,6 @@ class Main:
         self.PRIORITY = __addon__.getSetting( "priority" )
         self.FALLBACKPATH = __addon__.getSetting( "fallback_path" )
         self.OVERRIDEPATH = __addon__.getSetting( "slideshow_path" )
-        self.REFRESHEVERYIMAGE = __addon__.getSetting( "refresh_every_image" )
-        try:
-            self.minrefresh = int(__addon__.getSetting( "min_refresh" ))
-        except:
-            self.minrefresh = 20
         self.RESTRICTCACHE = __addon__.getSetting( "restrict_cache" )
         try:
             self.maxcachesize = int(__addon__.getSetting( "max_cache_size" )) 
* 1000000
@@ -223,14 +224,24 @@ class Main:
 
 
     def _init_vars( self ):
-        self.WINDOW = xbmcgui.Window( 12006 )
+        self.WINDOW = xbmcgui.Window( int(self.WINDOWID) )
+        self.WINDOW.clearProperty( "ArtistSlideshow.CleanupComplete" )
+        if( self.ARTISTFIELD == '' ):
+            self.SKINARTIST = ''
+        else:
+            self.SKINARTIST = "Window(%s).Property(%s)" % ( self.WINDOWID, 
self.ARTISTFIELD )
+        self.ARTISTSLIDESHOW = "Window(%s).Property(%s)" % ( self.WINDOWID, 
"ArtistSlideshow" )
+        self.ARTISTSLIDESHOWRUNNING = "Window(%s).Property(%s)" % ( 
self.WINDOWID, "ArtistSlideshowRunning" )
+        self.EXTERNALCALL = "Window(%s).Property(%s)" % ( self.WINDOWID, 
"ArtistSlideshow.ExternalCall" )
+        self.EXTERNALCALLSTATUS = xbmc.getInfoLabel( self.EXTERNALCALL )
+        log( 'external call is set to ' + xbmc.getInfoLabel( self.EXTERNALCALL 
) )
         self.NAME = ''
         self.LocalImagesFound = False
         self.CachedImagesFound = False
         self.ImageDownloaded = False
         self.DownloadedAllImages = False
         self.UsingFallback = False
-        self.BlankDir = xbmc.translatePath('%s/resources/blank/' % ( 
__addonpath__ ))
+        self.BlankDir = 
xbmc.translatePath('special://profile/addon_data/%s/transition' % __addonname__ 
)
         LastfmApiKey = 'fbd57a1baddb983d1848a939665310f6'
         HtbackdropsApiKey = '96d681ea0dcb07ad9d27a347e64b652a'
         self.LastfmURL = 
'http://ws.audioscrobbler.com/2.0/?autocorrect=1&api_key=' + LastfmApiKey
@@ -242,6 +253,7 @@ class Main:
         checkDir(xbmc.translatePath('special://profile/addon_data/%s' % 
__addonname__ ))
         checkDir(xbmc.translatePath('special://profile/addon_data/%s/temp' % 
__addonname__ ))
         
checkDir(xbmc.translatePath('special://profile/addon_data/%s/ArtistSlideshow' % 
__addonname__ ))
+        
checkDir(xbmc.translatePath('special://profile/addon_data/%s/transition' % 
__addonname__ ))
         
 
     def _start_download( self ):
@@ -249,10 +261,9 @@ class Main:
         self.DownloadedFirstImage = False
         self.DownloadedAllImages = False
         self.ImageDownloaded = False
-        try:
-            self.NAME = xbmc.Player().getMusicInfoTag().getArtist()
-        except:
-            return
+        self.FirstImage = True
+        min_refresh = 9.9
+        self.NAME = self._get_current_artist()
         if len(self.NAME) == 0:
             log('no artist name provided')
             return
@@ -265,26 +276,7 @@ class Main:
             checkDir(self.CacheDir)
         log('cachedir = %s' % self.CacheDir)
 
-        success = False
-        attempts = 0
-        while( not success ):
-            if( self._playback_stopped_or_changed() ):
-                    return
-            try:
-                files = os.listdir(self.CacheDir)
-            except OSError as (errno, strerror):
-                if( errno == 2 or errno == 3):
-                    checkDir( self.CacheDir )
-                else:
-                    log( 'error: %s %s' % (errno, strerror) )
-                    time.sleep(10)
-                success = False
-                attempts = attmepts + 1
-                if( attempts > 3 ):
-                    return
-            else:
-                success = True
-                
+        files = os.listdir(self.CacheDir)
         for file in files:
             if file.endswith('tbn'):
                 self.CachedImagesFound = True
@@ -292,8 +284,11 @@ class Main:
         if self.CachedImagesFound:
             log('cached images found')
             self.WINDOW.setProperty("ArtistSlideshow", self.CacheDir)
+            last_time = time.time()
             if self.ARTISTINFO == "true":
                 self._get_artistinfo()
+        else:
+            last_time = 0
 
         if self.LASTFM == "true":
             lastfmlist = self._get_images('lastfm')
@@ -304,38 +299,60 @@ class Main:
             htbackdropslist = self._get_images('htbackdrops')
         else:
             htbackdropslist = []
-
         lastfmlist.extend(htbackdropslist)
+
         log('downloading images')
         for url in lastfmlist:
             if( self._playback_stopped_or_changed() ):
+                self.WINDOW.setProperty("ArtistSlideshow", self.CacheDir)
+                self._clean_dir( self.BlankDir )
                 return
             path = getCacheThumbName(url, self.CacheDir)
+            path2 = getCacheThumbName(url, self.BlankDir)
             if not xbmcvfs.exists(path):
                 try:
-                    download(url, path)
+                    download(url, path, path2)
                 except:
                     log ('site unreachable')
                 else:
                     log('downloaded %s to %s' % (url, path) )
                     self.ImageDownloaded=True
             if self.ImageDownloaded:
-                if not self.DownloadedFirstImage:
-                    log('downloaded first image')
-                    self.DownloadedFirstImage = True
-                    last_time = 0
-                    if not self.CachedImagesFound:
-                        self.WINDOW.setProperty("ArtistSlideshow", 
self.CacheDir)
-                        if self.ARTISTINFO == "true":
-                            self._get_artistinfo()
-                elif(self.REFRESHEVERYIMAGE == 'true' and (time.time() - 
last_time > self.minrefresh)):
-                    self._refresh_image_directory()
+                if( self._playback_stopped_or_changed() ):
+                    self.WINDOW.setProperty("ArtistSlideshow", self.CacheDir)
+                    self._clean_dir( self.BlankDir )
+                    return
+                if not self.CachedImagesFound:
+                    self.CachedImagesFound = True
+                    if self.ARTISTINFO == "true":
+                        self._get_artistinfo()
+                wait_elapsed = time.time() - last_time
+                if( wait_elapsed > min_refresh ):
+                    if( not (self.FirstImage and not self.CachedImagesFound) ):
+                        self._wait( min_refresh - (wait_elapsed % min_refresh) 
)
+                    if( not self._playback_stopped_or_changed() ):
+                        self._refresh_image_directory()
                     last_time = time.time()
+                self.FirstImage = False
                     
         if self.ImageDownloaded:
             log('finished downloading images')
             self.DownloadedAllImages = True
-            self._refresh_image_directory()
+            if( self._playback_stopped_or_changed() ):
+                self.WINDOW.setProperty("ArtistSlideshow", self.CacheDir)
+                self._clean_dir( self.BlankDir )
+                return
+            log( 'cleaning up from refreshing slideshow' )
+            wait_elapsed = time.time() - last_time
+            if( wait_elapsed < min_refresh ):
+                self._wait( min_refresh - wait_elapsed )
+            if( not self._playback_stopped_or_changed() ):
+                self._refresh_image_directory()
+            if( xbmc.getInfoLabel( self.ARTISTSLIDESHOW ) == self.BlankDir ):
+                self._wait( min_refresh )
+                if( not self._playback_stopped_or_changed() ):
+                    self._refresh_image_directory()
+            self._clean_dir( self.BlankDir )
 
         if not self.ImageDownloaded:
             log('no images downloaded')
@@ -343,31 +360,63 @@ class Main:
             if not self.CachedImagesFound:
                 log('clearing ArtistSlideshow property')
                 self.WINDOW.clearProperty("ArtistSlideshow")
-                if self.ARTISTINFO == "true":
+                if( self.ARTISTINFO == "true" and not 
self._playback_stopped_or_changed() ):
                     self._get_artistinfo()
 
 
+    def _wait( self, wait_time ):
+        waited = 0
+        while( waited < wait_time ):
+            time.sleep(0.1)
+            waited = waited + 0.1
+            if( self._playback_stopped_or_changed() ):
+                self.WINDOW.setProperty("ArtistSlideshow", self.CacheDir)
+                self.Abort = True
+                return
+
+
+    def _clean_dir( self, dir_path ):
+        try:
+            old_files = os.listdir( dir_path )
+        except:
+            old_files = []
+        for old_file in old_files:
+            xbmcvfs.delete( '%s/%s' % (dir_path, old_file) )
+            log( 'deleting file %s/%s' % (dir_path, old_file) )
+
+
     def _refresh_image_directory( self ):
-        self.WINDOW.setProperty("ArtistSlideshow", self.BlankDir)
-        time.sleep(2)
-        self.WINDOW.setProperty("ArtistSlideshow", self.CacheDir)
+        if( xbmc.getInfoLabel( self.ARTISTSLIDESHOW ) == self.BlankDir):
+            self.WINDOW.setProperty("ArtistSlideshow", self.CacheDir)
+            log( 'switching slideshow to ' + self.CacheDir )
+        else:    
+            self.WINDOW.setProperty("ArtistSlideshow", self.BlankDir)
+            log( 'switching slideshow to ' + self.BlankDir )
 
 
-    def _playback_stopped_or_changed( self ):
-        if xbmc.Player().isPlayingAudio() == True:
-            currentname = xbmc.Player().getMusicInfoTag().getArtist()
-            if self.NAME != currentname:
-                return True
+    def _get_current_artist( self ):
+        if( xbmc.Player().isPlayingAudio() == True ):
+            artist = xbmc.Player().getMusicInfoTag().getArtist()
+            if( artist == '' ):
+                return xbmc.Player().getMusicInfoTag().getTitle()
+            else:
+                return artist
+        elif( not xbmc.getInfoLabel( self.SKINARTIST ) == '' ):
+            return  xbmc.getInfoLabel( self.SKINARTIST )
         else:
+            return ''
+
+
+    def _playback_stopped_or_changed( self ):
+        if (self.NAME != self._get_current_artist() or self.EXTERNALCALLSTATUS 
!= xbmc.getInfoLabel(self.EXTERNALCALL) ):
             return True
+        else:
+            return False
 
 
     def _get_local_images( self ):
         self.LocalImagesFound = False
-        try:
-            self.NAME = xbmc.Player().getMusicInfoTag().getArtist()
-        except:
-            return
+        self.NAME = self._get_current_artist()
         if len(self.NAME) == 0:
             log('no artist name provided')
             return
@@ -397,31 +446,17 @@ class Main:
                 cache_root = xbmc.translatePath( 
'special://profile/addon_data/%s/ArtistSlideshow/' % __addonname__ )
                 os.chdir( cache_root )
                 folders = os.listdir( cache_root )
-
-                success = False
-                while( not success ):
-                    if( self._playback_stopped_or_changed() ):
-                        return
-                    try:
-                        folders.sort( key=lambda x: os.path.getmtime(x), 
reverse=True )
-                    except OSerror:
-                        time.sleep(10)
-                        success = False
-                    else:
-                        success = True                    
-
+                folders.sort( key=lambda x: os.path.getmtime(x), reverse=True )
                 cache_size = 0
                 first_folder = True
                 for folder in folders:
+                    if( self._playback_stopped_or_changed() ):
+                        break
                     cache_size = cache_size + self._get_folder_size( 
cache_root + folder )
                     log( 'looking at folder %s cache size is now %s' % 
(folder, cache_size) )
                     if( cache_size > self.maxcachesize and not first_folder ):
-                        log( 'attempting to delete folder %s' % folder )
-                        try:
-                            shutil.rmtree( cache_root + folder, True )
-                            log( '%s successfully deleted' % folder )
-                        except:
-                            log( '%s was not deleted due to an error' % folder 
)                            
+                        self._clean_dir( cache_root + folder )
+                        log( 'deleted files in folder %s' % folder )
                     first_folder = False
                 self.LastCacheTrim = now
 
@@ -439,8 +474,10 @@ class Main:
         if site == "lastfm":
             self.info = 'artist.getImages'
             self.url = self.LastfmURL + '&method=artist.getImages&artist=' + 
self.NAME.replace('&','%26').replace(' ','+')
+            log( 'asking for images from: %s' %self.url )
         elif site == "htbackdrops":
             self.url = self.HtbackdropsQueryURL + '&keywords=' + 
self.NAME.replace('&','%26').replace(' ','+') + '&dmin_w=' + str( self.minwidth 
) + '&dmin_h=' + str( self.minheight )
+            log( 'asking for images from: %s' %self.url )
         images = self._get_data(site, 'images')
         return images
 
@@ -560,7 +597,7 @@ class Main:
 
 
     def _clear_properties( self ):
-        if not xbmc.getInfoLabel( 
"Window(12006).Property(ArtistSlideshowRunning)" ) == "True":
+        if not xbmc.getInfoLabel( self.ARTISTSLIDESHOWRUNNING ) == "True":
             self.WINDOW.clearProperty("ArtistSlideshow")
         self.WINDOW.clearProperty( "ArtistSlideshow.ArtistBiography" )
         for count in range( 50 ):
@@ -572,5 +609,6 @@ class Main:
 
 if ( __name__ == "__main__" ):
         log('script version %s started' % __addonversion__)
-        Main()
+        slideshow = Main()
+        slideshow.WINDOW.setProperty("ArtistSlideshow.CleanupComplete", "True")
 log('script stopped')
diff --git a/script.artistslideshow/resources/language/English/strings.xml 
b/script.artistslideshow/resources/language/English/strings.xml
index 8ebe5d5..7f74a65 100644
--- a/script.artistslideshow/resources/language/English/strings.xml
+++ b/script.artistslideshow/resources/language/English/strings.xml
@@ -59,8 +59,6 @@
     <string id="32102">  Image Priority</string>
     <string id="32103">Fallback slideshow folder</string>
     <string id="32104">Override slideshow folder</string>
-    <string id="32105">Refresh slideshow before all downloads complete</string>
-    <string id="32106">  Minimum time between refresh (in seconds)</string>    
     <string id="32901">Use remote images first</string>
     <string id="32902">Use local images first</string>
     <string id="32903">Use both local and remote images</string>
diff --git a/script.artistslideshow/resources/settings.xml 
b/script.artistslideshow/resources/settings.xml
index a9d9f96..2b4b3d5 100644
--- a/script.artistslideshow/resources/settings.xml
+++ b/script.artistslideshow/resources/settings.xml
@@ -14,12 +14,9 @@
         <setting id="priority" type="enum" label="32102" 
lvalues="32901|32902|32903" default="0"/>
         <setting id="fallback_path" type="folder" label="32103" default=""/>
         <setting id="slideshow_path" type="folder" label="32104" default=""/>
-        <setting type="sep" />
-        <setting id="refresh_every_image" type="bool" label="32105" 
default="false"/>
-        <setting id="min_refresh" type="text" label="32106" 
enable="eq(-1,true)" default="20" />
     </category>
     <category label="32200">
         <setting id="restrict_cache" type="bool" label="32201" default="false" 
/>
-        <setting id="max_cache_size" label="32202" type="labelenum" 
values="256|512|768|1024|2048|3072|4096" enable="eq(-1,true)" default="1024" />
+        <setting id="max_cache_size" label="32202" type="labelenum" 
values="128|256|512|768|1024|2048|3072|4096" enable="eq(-1,true)" 
default="1024" />
     </category>
 </settings>

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

Summary of changes:
 script.artistslideshow/README.txt                  |  133 ++----------
 script.artistslideshow/addon.xml                   |    2 +-
 script.artistslideshow/changelog.txt               |    9 +
 script.artistslideshow/default.py                  |  216 ++++++++++++--------
 .../resources/blank/black-16x9.jpg                 |  Bin 3196 -> 0 bytes
 .../resources/language/English/strings.xml         |    2 -
 script.artistslideshow/resources/settings.xml      |    5 +-
 7 files changed, 157 insertions(+), 210 deletions(-)
 delete mode 100644 script.artistslideshow/resources/blank/black-16x9.jpg


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to