Playlist stuff.
[clinton/xbmc-groove.git] / default.py
index 5250150..d4c6dfa 100644 (file)
@@ -343,13 +343,10 @@ class Groveshark:
         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()
@@ -512,8 +509,8 @@ class Groveshark:
 
     # 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:
@@ -522,7 +519,7 @@ class Groveshark:
                 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.')
@@ -835,10 +832,7 @@ elif mode==MODE_ALBUM:
     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)