self._add_albums_directory(albums, artistid)
# Show selected playlist
- def playlist(self, playlistid, playlistname, version = 2):
+ def playlist(self, playlistid, playlistname):
userid = self._get_login()
if (userid != 0):
- if version == 1:
- songs = self.groovesharkApiv1.playlistGetSongs(playlistid)
- else:
- songs = groovesharkApi.getPlaylistSongs(playlistid)
+ songs = groovesharkApi.getPlaylistSongs(playlistid)
self._add_songs_directory(songs, trackLabelFormat=NAME_ALBUM_ARTIST_LABEL, playlistid=playlistid, playlistname=playlistname)
else:
dialog = xbmcgui.Dialog()
# Remove song from playlist
def removePlaylistSong(self, playlistid, playlistname, songpos):
- dialog = xbmcgui.Dialog(version = 1)
- if dialog.yesno('Grooveshark XBMC', 'Delete this song from the Grooveshark playlist?') == True:
+ dialog = xbmcgui.Dialog()
+ if dialog.yesno('Grooveshark XBMC', 'Delete this song from', 'the Grooveshark playlist?') == True:
userid = self._get_login(version = 1)
if (userid != 0):
if self.groovesharkApiv1.playlistDeleteSong(playlistid, songpos) == 0:
else:
# Refresh to remove item from directory
xbmc.executebuiltin('XBMC.Notification(Grooveshark XBMC, Removed song from Grooveshark playlist, 1000, ' + thumbDef + ')')
- xbmc.executebuiltin("Container.Update(" + playlistUrl + "&id="+str(playlistid) + "&name=" + playlistname + "&version=1)")
+ xbmc.executebuiltin("Container.Update(" + playlistUrl + "&id="+str(playlistid) + "&name=" + playlistname + ")")
else:
dialog = xbmcgui.Dialog()
dialog.ok('Grooveshark XBMC', 'You must be logged in', 'to delete a song from a Grooveshark playlist.')
grooveshark.album(id)
elif mode==MODE_PLAYLIST:
- version = 2
- try: version=urllib.unquote_plus(params["version"])
- except: pass
- grooveshark.playlist(id, name, version)
+ grooveshark.playlist(id, name)
elif mode==MODE_FAVORITE:
grooveshark.favorite(id)