Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

support for multiple featured artists

  • Loading branch information...
commit 1820efea91394645838539e4535dfa5facc9543d 1 parent 2149c3a
@pkscout authored
Showing with 15 additions and 14 deletions.
  1. +1 −0  changelog.txt
  2. +14 −14 default.py
View
1  changelog.txt
@@ -1,4 +1,5 @@
v.1.5.1
+- added ability to parse multiple featured artists from title of song
- fixed bug on Windows where once override or fallback were set they could not be unset
- changed artist bio download so it downloads even if just showing the override images
- updated artist bio infolabel to filter out link to READ MORE on last.fm
View
28 default.py
@@ -145,15 +145,15 @@ def __init__( self ):
if(not (self.LocalImagesFound and self.PRIORITY == '1')):
log('same artist playing, continue download')
self._use_correct_artwork()
- elif ( self.DAEMON == "False" ):
- self._clean_dir( self.MergeDir )
- self._set_property("ArtistSlideshowRunning")
- #else:
- # time.sleep(1) # doublecheck if playback really stopped
- # if( xbmc.Player().isPlayingAudio() == False and xbmc.getInfoLabel( self.EXTERNALCALL ) == '' ):
- # if ( self.DAEMON == "False" ):
- # self._clean_dir( self.MergeDir )
- # self._set_property("ArtistSlideshowRunning")
+ #elif ( self.DAEMON == "False" ):
+ # self._clean_dir( self.MergeDir )
+ # self._set_property("ArtistSlideshowRunning")
+ else:
+ time.sleep(2) # doublecheck if playback really stopped
+ if( xbmc.Player().isPlayingAudio() == False and xbmc.getInfoLabel( self.EXTERNALCALL ) == '' ):
+ if ( self.DAEMON == "False" ):
+ self._clean_dir( self.MergeDir )
+ self._set_property("ArtistSlideshowRunning")
else:
self._clear_properties()
break
@@ -482,7 +482,7 @@ def _split_artists( self, response):
def _get_featured_artists( self, data ):
- return data.replace('ft.','feat.').split('feat.')
+ return self._split_artists( data.replace('ft.','feat.').split('feat.')[-1] )
def _get_current_artist( self ):
@@ -493,7 +493,7 @@ def _get_current_artist( self ):
artists = json.loads(response)['result']['item']['artist']
if( len( artists ) == 0 ):
try:
- response = xbmc.Player().getMusicInfoTag().getTitle()[0:(artist.find('-'))-1]
+ response = xbmc.Player().getMusicInfoTag().getTitle()[0:(response.find('-'))-1]
except RuntimeError:
response = ''
artists = self._split_artists( response )
@@ -504,9 +504,9 @@ def _get_current_artist( self ):
elif( not xbmc.getInfoLabel( self.SKINARTIST ) == '' ):
response = xbmc.getInfoLabel( self.SKINARTIST )
artists = self._split_artists( response )
- featured_artist = self._get_featured_artists( xbmc.getInfoLabel( self.SKINTITLE ) )
- if len( featured_artist ) > 1:
- artists.append( featured_artist[-1] )
+ featured_artists = self._get_featured_artists( xbmc.getInfoLabel( self.SKINTITLE ) )
+ if len( featured_artists ) > 1:
+ artists.append( featured_artists )
return [a.strip(' ()') for a in artists]
Please sign in to comment.
Something went wrong with that request. Please try again.