christopher-dG / gpymusic

Google Py Music: A simple TUI client for Google Play Music
MIT License
200 stars 13 forks source link

Search not working with free account #5

Closed christopher-dG closed 7 years ago

christopher-dG commented 7 years ago

From the gmusicapi docs:

Free account search is restricted so may not contain hits for all result types.

After some investigation, the restricted content is values for keys 'album_hits', 'artist_hits', 'playlist_hits', 'situation_hits', and 'song_hits' pmcli.search()Uses 'song_hits', 'artist_hits', and 'album_hits' to generate results, so naturally it's unsuccessful.

I don't really have a solution for this, other than making free users only capable of radio stations. It's something that needs to be worked on in gmusicapi. If anyone has thoughts on how to work around this, I'd love to hear them.

jackkinsey commented 7 years ago

Some testing with gmusicapi confirmed for me that free accounts can use Mobileclient.get_all_songs, so I guess you could use that to build a local library index and then implement search locally? Would almost definitely mean a performance hit, especially considering the time it would take to load the library file on launch (mine is ~2 MB for a ~2,000 song library), but I suppose it's better than the thing just not working for free users.

christopher-dG commented 7 years ago

Yeah, I think this is really the only good option.