GNOME Bugzilla – Bug 309228
CD cover art display
Last modified: 2021-05-17 15:48:33 UTC
Since sound-juicer is getting player capabilities, it should be nice if it could also display a cover thumbnail of the cd currently being played. Cover art sources can be one of these: - musicbrainz.org, I don't know if it provides cover art, but this blog post [1] seems to confirm that - amazon.com, like amarok player, but an amazon web services developer registration key will be required - google.com, like goobox [1] http://blog.musicbrainz.org/archives/2004/02/server_updates_18.html
Created attachment 48471 [details] cover art display mockup
Is cover art really useful for a CD player/ripper? In order to use Sound Juicer, you need to have the CD and then you presumedly have the cover too, right? If you want to add cover art, I think it should be displayed on the right side of the window, so the user doesn't have to zigzag around it to use the controls that are all on the left side. (And I think it would look better too.)
Having the cd cover displayed is not usefull, but it is nice to see which cd you are listening to, even you you don't have the cd case under your eyes. As for the position, the widgets at the right of the cd cover image doesn't need interaction with the user, they are auto-filled with information from musicbrainz.org, so I think that left placement is not a bad choice (but I will try to draw a mockup with the cd cover on the right side, maybe I'm wrong).
Today I have started developing a cd cover gtk widget able to grab the cover image from amazon.com given the asin code of the cd. The asin code can be easily retrieved from musicbrainz with MBE_AlbumGetAmazonAsin query. Musicbrainz always return an empty string to MBE_AlbumGetAmazonCoverartURL query. At the moment the widget only check for cached cover images, and doesn't really query Amazon. The next step is to get image url with a soap request, so if someone has libsoup tutorials or sample code please let me know.
Created attachment 49690 [details] Work in progress What I have done so far.
Luca, you might want to check this post, which contains a cover from amazon using search data: http://mail.gnome.org/archives/rhythmbox-devel/2003-August/msg00225.html
Bastien, thanks for the post, quite interesting, but at the moment I'm trying with the SOAP interface. I can succesfully contact amazon.com, send an asin search request and obtain an answer, which indeed is: "We encountered an error at our end while processing your request. Please try again", so maybe my request is not so well formatted. I will try again later and eventually investigate a bit more.
Good news. The SOAP interface seems to work well, and libsoup is easy to use (at least for this simple task). I receive the correct answer from ECS 4.0 with the three image url's (small, medium and big). Now I have to parse the response, but shouldn't be hard, clean up the code, and make it work with Sound-Juicer :)
Created attachment 50023 [details] CoverImage widget (not yet finished) The widget is almost finished. It now implements a fallback search using artist/title, since musicbrainz provides asin code for very few albums. As requested by Amazon Web Services Licensing Agreement the cache isn't kept for more than three months. I have tested Sound-Juicer integration (at the moment it requires fixed size, I used 105, but I would like to let the widget expand/shrink as needed; I had also to force a call to gtk_widget_show to make it visible) and it is nice to see cd cover being displayed as soon as you put a cd in the reader :) The tarball includes a simple test application, see comments for compiling options. Remember also to add you Amazon registration ID replacing: #define GNOME_DEV_TAG "********************" with the correct string (I can't provide my own, as requested by Amazon Web Services Licensing Agreement, sorry) There is only one problem left to be solved: eel_copy_uri_simple sometimes works, sometimes doesn't and the web server reply with a 404 error. The code includes a temporary workaround. This is my very first gtk widget, so any comments or suggestions will be more than welcome (but remember this is yet wip :).
Created attachment 50099 [details] screenshot A screenshot in case you haven't a valid Amazon registration ID.
So how would users use this? Do they need to register at amazon? How do other apps (muine, amarok) do that? I'd say that the image needs to be layed out at the right instead of the left of the window, btw, but I'm not a UI expert so I may be totally wrong. ;).
Ronald, I don't know Muine, but Amarok has its own amazon id (see coverfetcher.cpp). I think that gnome can register itself and use the obtained id on all gnome projects which need interaction with amazon, alternatively every project can request its own id. Of course the users will never need to register for a valid id. As for the widget position it can be easily placed to the right or to the left side. I prefer to have it on the left, but it seems that you are not the only one who prefer to have it on right side, so maybe it isn't a bad choice too.
Hi, Once you have the cover image it would be great to be able to save it on disk along the ripped tracks.
This might be better as a separate bug, but further to comment 13 ... If ripping a CD to mp3, it would be nice to have the option of writing the image to the mp3 file's ID3 tags (similarly for any other formats that allow storage of the image). However, if the image came from Amazon, then their 3 month rule would prevent this.
This seems really cool, any progress in the last six months?
When a plugin system will be added this option can be implemented as a plugin.
I have tried this CoverImage testing program and it works pretty fine for me (thanks to luca). I am going to try to implement this in sound-juicer, will take some while though since I don't have too much time.
Any progress on this Matthias?
Hi Matthew, Till now I haven't had much time. I will probably have to invest more time then I first thought. But if you want to give it a try, just go for it. But please let me know if you start working on it.
I was just checking if you were still going to work on it. If you do stop work on it, if you would please leave a comment that would be great :).
Ok i stop working on it since my time is short for the moment. You can give it a try :p
Even if it's not a bug, I do think that a mean to fetch covers is a major feature for sound extraction applications. Moreover, this can increase the integration with desktop: the objective is to provide a thumbnail for music files independently from the music program. As a matter of fact, video and images thumbnails are available thanks to capture, but music files/directory is displayed poorly. This is a important lack for modern OS dealing with lots of media (and music is one of the major use for personal computer today). Thus, this feature includes the ability to fetch the cover when ripping a CD, to save the cover file accordingly (either in a cover file, or using tag depending on user preference), and to use it for display in every programs, in particular in nautilus (see the displayCover script - http://dwayneb.free.fr/blog/index.php/2007/08/30/12-displaycover - able to change the icon directory to the album cover in nautilus).
Cedric: as you can see from the comments this is being worked on now. If you want to help, you are welcome to work on the patch.
Is anyone working on this at this point?
In addition, I couldn't find Amazon's "three month rule", but I did find: "5.1.11. You may store a link for a product image included in Amazon Properties for up to 24 hours, but you may not store or cache the product image itself." Looks like this would specifically contravene the license. Is there anywhere else we could look for cover data?
I'm not working on it.
The widget I posted is rather primitive (if I remember well it was fixed sized, it should be resizeable) and was developed with the old libsoup library. It should be improved a bit and ported to the new libsoup 2.4 API. Even with the widget finalized I think it sould be better to wait for the new plugin system and add this feature using an external plugin. Another idea is to make a port of the Rhythmbox cover plugin (if doable, I have never looked at the code). As for the Amazon Web Services Customer Agreement it seems that the changed the license :(
It seems that Musicbrainz now provides a cover thumbnail along with album details. I searched via web interface for some albums and all of them come with cd cover art, which is actually an image hosted on Amazon servers (there is also a link to buy the album).
Yeah, I looked through the Banshee code, and it appears that they get their Amazon cover art through Musicbrainz. Now, I think that if we got the cover art _from_ Musicbrainz (thus, we wouldn't be agreeing to the Amazon Web Services Customer Agreement), the terms thereof may or may not apply to us. It does seem that they'd rather we not do that. They also have code to get cover art from Rhapsody (which I think is higher-resolution, it's 500x500), but the code does have a comment which reads "awesome hack", so I'm not sure whether or not it'd be good to take that. Anyway, I'll see about writing something over the weekend (I'm working on something else at the moment).
I put the cover art display idea (with a focus on the integration with gnome applications) at ubuntu brainstorm. If you like it you can vote for it :-)
Note that goobox 2.0 supports downloading cover art, so using the code they have might be a good idea.
(In reply to comment #31) > Note that goobox 2.0 supports downloading cover art, so using the code they > have might be a good idea. Make sure that you get the code under a license compatible with the GPL+exception being worked on.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/sound-juicer/-/issues/33.