simon-weber / gmusicapi

An unofficial client library for Google Music.
https://unofficial-google-music-api.readthedocs.io
BSD 3-Clause "New" or "Revised" License
2.49k stars 258 forks source link

Support album art mutation #38

Closed simon-weber closed 11 years ago

simon-weber commented 12 years ago

Album art can be changed through the web interface, and should be a fairly straightforward feature to add. I don't have the time to implement it, though.

simon-weber commented 11 years ago

This is a pretty straightforward 2-part protocol.

First, upload an image: url: https://play.google.com/music/services/imageupload params:

response: json {"imageUrl":"http://lh6.ggpht.com/[long id]s130-c-e100","imageDisplayUrl":"//lh6.googleusercontent.com/[long id]s130-c-e100"}

Then, use modifyentries to set albumArtUrl to the imageUrl provided in the last response.

ralfharing commented 11 years ago

I was having trouble updating the album art via the webpage and went looking to see if there was a way to do this programmatically (or see what was going wrong if there was really an error). Thanks for figuring this out! I saw in the readme that album art manipulation was "coming soon". Is there anything I can do to help?

simon-weber commented 11 years ago

I'm pretty set on the protocol right now, so all that's left to do is declare the calls and expose them with the api.

If you're feeling adventurous, feel free to take a stab at contributing: recent changes have made the protocol interface a lot nicer. The first step would be making a new WcCall (maybe UploadImage?) in https://github.com/simon-weber/Unofficial-Google-Music-API/blob/session-overhaul/gmusicapi/newprotocol/webclient.py. The docs for Call in https://github.com/simon-weber/Unofficial-Google-Music-API/blob/session-overhaul/gmusicapi/newprotocol/shared.py should make it pretty clear what's going on. Feedback is appreciated on this stuff, by the way; the goal is to make internals clearer so folks feel more comfortable contributing.

If you're not comfortable working on it: no problem. I'll get back in touch when I've got something you can test out. I don't have an ETA right now, but expect news within a week or so (I've got a few things this is waiting on).

simon-weber commented 11 years ago

This is implemented in 4bb85a9f9a557282fe393476e134855cee2f9677. It's not working just yet, since Music seems to be broken at the moment...I'll come back to this once I can change album art on the website successfully.

ralfharing commented 11 years ago

Looks like it's a common problem right now. http://productforums.google.com/d/topic/apps/p-PLnpM_jjA/discussion http://productforums.google.com/d/topic/apps/haCCXvF669U/discussion http://forums.androidcentral.com/android-applications/245599-google-play-music-web-client-album-art-issues.html

simon-weber commented 11 years ago

Wow, I can't believe this problem has gone on for so long. Thanks for finding these links.

ralfharing commented 11 years ago

fyi, it looks like the web site is working again

simon-weber commented 11 years ago

Great; thanks for letting me know.

simon-weber commented 11 years ago

Ok, I've finally got this working in 2c1984844d76defa595df853e09e0d0aedd04736.

It's not heavily tested yet, but it seems to work.