Use song URL for playback.
[clinton/xbmc-groove.git] / default.py
index 11580b8..bf28a07 100644 (file)
@@ -195,7 +195,7 @@ class Groveshark:
     # Show selected artist
     def artist(self, artistid):
         albums = groovesharkApi.getArtistAlbums(artistid, limit = self.albumsearchlimit)
-        self._add_albums_directory(albums, artistid)
+        self._add_albums_directory(albums)
     
     # Show selected playlist
     def playlist(self, playlistid):
@@ -211,12 +211,12 @@ class Groveshark:
     def playSong(self, item):
         songid = item.getProperty('songid')
         song = groovesharkApi.getSongURLFromSongID(songid)
-        if os.path.isfile(song):
+        if song != '':
             item.setPath(song)
             xbmc.log("Playing: " + song)
             xbmcplugin.setResolvedUrl(handle=int(sys.argv[1]), succeeded=True, listitem=item)
         else:
-            xbmc.executebuiltin('XBMC.Notification(Grooveshark XBMC, Cannot play song, 1000, ' + thumbDef + ')')
+            xbmc.executebuiltin('XBMC.Notification(Grooveshark XBMC, Unable to play song, 1000, ' + thumbDef + ')')
     
     # Make a song directory item
     def songItem(self, songid, name, album, artist, coverart):