2021-02-09, 01:54
(2021-02-08, 23:32)manfeed Wrote: I have also tested with images, with Window(Visualisation).Property(ArtistSlideshow.%.AlbumThumb) and it happens exactly the same, the old images keep showing. This is the log...I think I found the problem. I'm not at home (and won't be until next week), so I don't have an easy way to test the fix though. If you're up for it, there are two small changes in one file.
https://paste.kodi.tv/orefedelur.kodi
Thanks.
file: <kodi userdata folder>/addons/script.artistslideshow/resources/lib/artistslideshow.py
change: lines 1076 and 1080 change str( count ) to str( count + 1 )
When you're done, the code in context should look like this:
Code:
def _set_properties( self ):
similar_total = ''
album_total = ''
self._set_property( 'ArtistSlideshow.ArtistBiography', self.BIOGRAPHY )
for count, item in enumerate( self.SIMILAR ):
self._set_property( 'ArtistSlideshow.%d.SimilarName' % ( count + 1 ), item[0] )
self._set_property( 'ArtistSlideshow.%d.SimilarThumb' % ( count + 1 ), item[1] )
similar_total = str( count + 1 )
for count, item in enumerate( self.ALBUMS ):
self._set_property( 'ArtistSlideshow.%d.AlbumName' % ( count + 1 ), item[0] )
self._set_property( 'ArtistSlideshow.%d.AlbumThumb' % ( count + 1 ), item[1] )
album_total = str( count + 1 )
self._set_property( 'ArtistSlideshow.SimilarCount', similar_total )
self._set_property( 'ArtistSlideshow.AlbumCount', album_total )
Basically I didn't properly take into account how the enumerate function generates numbers versus the range function that is used later when unsetting the items.