Example #1
0
 def playArtist(self, artist):
     self.is_active = True
     common.process_true()
     common.limit_artists(common.limit_result())
     self.similar_artists = []
     self.ignore_list = []
     self.video_list = []
     self.genre_list = lastfm.get_artist_genre(artist)
     self.start_artist = artist
     self.last_artist = self.start_artist
     self.artist = artist
     self.set_resume_point()
     self.playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
     self.clear_playlist()
     self.add_video(artist)
     self.play(self.playlist)
Example #2
0
 def playArtist(self,artist):
     self.is_active = True
     common.process_true()
     common.limit_artists(common.limit_result())
     self.similar_artists = []
     self.ignore_list = []
     self.video_list = []
     self.genre_list = lastfm.get_artist_genre(artist)
     self.start_artist = artist
     self.last_artist = self.start_artist
     self.artist = artist
     if common.resume():
         self.set_resume_point()
     self.playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
     self.clear_playlist()
     self.add_video(artist)
     self.play(self.playlist)
Example #3
0
 def set_artist(self,a):
     next_artist = False
     loop = 0
     if a and not self.similar_artists:
         return
     while not next_artist and not xbmc.abortRequested and self.is_active:
         loop += 1
         self.remove_ignored_artists()
         for x in range(0,10):
             if self.similar_artists:
                 artist = self.similar_artists[random.randint(0,(len(self.similar_artists)-1))]
                 genres = lastfm.get_artist_genre(artist)
                 if lastfm.compare_genres(self.genre_list,genres) == True:
                     self.artist = artist
                     next_artist = True
                     break
                 else:
                     self.add_to_ignore_list(artist)
                     self.remove_ignored_artists()
         if not next_artist:
             self.set_similiar_artists()
         if loop == 20:
             break
Example #4
0
 def set_artist(self, a):
     next_artist = False
     loop = 0
     if a and not self.similar_artists:
         return
     while not next_artist and not xbmc.abortRequested and self.is_active:
         loop += 1
         self.remove_ignored_artists()
         for x in range(0, 10):
             if self.similar_artists:
                 artist = self.similar_artists[random.randint(
                     0, (len(self.similar_artists) - 1))]
                 genres = lastfm.get_artist_genre(artist)
                 if lastfm.compare_genres(self.genre_list, genres) == True:
                     self.artist = artist
                     next_artist = True
                     break
                 else:
                     self.add_to_ignore_list(artist)
                     self.remove_ignored_artists()
         if not next_artist:
             self.set_similiar_artists()
         if loop == 20:
             break