vially/googlemusic-xbmc — pull request #35 by tlm2021 (2013-12-02 05:12:07+00:00)
Title: Fixed issue with playlists not showing all songs with Mobileclient

I got so excited when I found this plugin that when it didn't work for me today I spent my whole day trying to fix it.

It looks like, when updating playlists while using the Mobileclient, it wasn't storing any of the songs it found in the 'all_music' table. Additionally, it was storing the trackId in the 'playlists_songs' table, instead of the normal 'id', causing issues with joining records. Finally, the table in 'all_music' didn't have a column that covered 'trackId'.

When trying to populate the list of tracks, it does a JOIN between 'playlists_songs' and 'songs', but first these records weren't making it into the table, and then when the table didn't have a column for that key. It would only work if you first updated "all_tracks", and even then "all_tracks" is only items added to your library, so any All Access songs you added to a playlist but not your library wouldn't show up.

So now instead I add the normal 'id' to the 'playlists_songs' table, and just store the trackId in the 'songs' table.

When trying to play a song using the Mobileclient, it didn't seem to like the normal 'id' that was being passed in, and came came back with "Not Found" errors. So now whatever's in the 'trackId' column is what gets fed into "__getSongStreamUrl". The 'trackId' column contains a 'trackId' attribute whenever it's found. When not, it falls back on the plain 'id'.

Works for me smoothly so far...but admittedly I haven't been testing long. And I think it's backwards compatible for people not using the Mobileclient, but I haven't been able to test that myself.