I sometimes use Amarok for playing music. It makes it very easy to
load cover art for my collection.
Anyone know of a way to extract the cover art from Amarok for use with
Slimserver?
Don't want to reinvent the wheel in case anyone is already doing this.
--
Bill Moseley
moseley (AT) hank (DOT) org
Results 1 to 10 of 17
-
2007-03-17, 16:45 #1Bill MoseleyGuest
Integrating cover art from Amarok
-
2007-03-17, 17:24 #2
I did exactly this. I used an Amarok script add-on called "CopyCover", available from
http://www.kde-apps.org/content/show.php?content=22517
It is intended to copy the cover of the currently played song to the song's physical dir location, but there is also an "offline" version of the script which I modified to copy all covers in Amarok's album cache to one directory, using names like
<Artist> - <Album>.jpg
This folder is then used as a common album art folder in SlimServer's settings (I personally prefer this solution over the folder.jpg approach because you can more easily do things on ALL the covers, e.g. reorganize them or run batch image processing on all of them). It took about one hour of manual post-processing as some of the artist/album names contain strange characters and stuff like that but now it works like a charm.
Just to prevent avoidable confusion/damage to your music and artwork files: read the README file of the copycover script package before executing anything. There is a command line switch for only pretending to do copy the covers in order to show what the script WOULD do. You might find this useful... I also slightly modified the script to first copy everything to a "working directory" so that nothing was done/changed in the server files themselves before I was sure everything was sorted out correctly.
Hope this gives any help to your plans. Cheers,
Sebastian
-
2007-03-19, 07:41 #3
Sebastian-
would you be willing to post your modified script here? If not, could you email it to the address on my profile?
I've wanted to do this for years...Amarok's cover manager is excellent, and I'd love to be able to offload the art.
cheers,
#!/benFormer Logitech Developer: Squeezeplay/SqueezeOS/SqueezeboxController/SqueezeCenter
Community Developer: Nokia770Skin (r.i.p.)
http://www.last.fm/user/bklaas/
KHAAAN!...BUNNIES!
-
2007-03-21, 20:24 #4Bill MoseleyGuest
Integrating cover art from Amarok
On Mon, Mar 19, 2007 at 07:41:45AM -0700, bklaas wrote:
>
> Sebastian-
>
> would you be willing to post your modified script here? If not, could
> you email it to the address on my profile?
Sure, soon as I can get the md5 generation to match up what Amarok is
doing....
--
Bill Moseley
moseley (AT) hank (DOT) org
-
2007-03-21, 20:55 #5Bill MoseleyGuest
Integrating cover art from Amarok
On Wed, Mar 21, 2007 at 08:24:27PM -0700, Bill Moseley wrote:
> On Mon, Mar 19, 2007 at 07:41:45AM -0700, bklaas wrote:
> >
> > Sebastian-
> >
> > would you be willing to post your modified script here? If not, could
> > you email it to the address on my profile?
>
> Sure, soon as I can get the md5 generation to match up what Amarok is
> doing....
Oops -- I'm not Sebastian.
What do you want the script to do?
I just wrote an (unrelated) script that moved all my music files into
directories <artist>/<album> based on the id3 or meta tags.
So, my script will just scan the music folder and then try and find
the album art by creating the md5 hash that Amarok uses to store the
image file -- then look for the image and hard link it into the
album's directory.
Not sure what to do when a directory contains multiple tracks where the
artist/album don't all match. I believe there should only be one
image file per album folder.
amarok=>
select distinct
artist.name,
album.name,
md5(lower( artist.name || album.name ))
from
tags
join artist on tags.artist = artist.id
join album on tags.album = album.id
where
tags.album = 795;
name | name | md5
----------------------------+-------------+----------------------------------
Bob Marley And The Wailers | Natty Dread | 93273eeff74ade8dbc2cef6293775280
(1 row)
And the associated album art:
..kde/share/apps/amarok/albumcovers/large/93273eeff74ade8dbc2cef6293775280
--
Bill Moseley
moseley (AT) hank (DOT) org
-
2007-03-22, 07:59 #6
hi Bill-
I ran your SQL query without the 'where tags.album = <albumid>' clause and all records return the same md5sum. Any ideas there?
I have a script that I used to use for a very, very similar task that could be reworked for this purpose. If you want to pool resources, I'm game.
cheers,
#!/benFormer Logitech Developer: Squeezeplay/SqueezeOS/SqueezeboxController/SqueezeCenter
Community Developer: Nokia770Skin (r.i.p.)
http://www.last.fm/user/bklaas/
KHAAAN!...BUNNIES!
-
2007-03-22, 15:41 #7
Hi Ben,
sorry for the delayed answer, I had some web access troubles for the last days. Of course, you can have my modification, it (the modification) is of rather ridiculous complexity, as I only use the original offline script to gather all the files in a temp directory with as I wrote
<Artist> - <Album>.jpg
as filenames. To be honest, I own roundabout 1000 CDs but there are only about 25 various artist ones beneath them, so I did not start to struggle with this well discussed issue too long but just did some manual copying and adjusting for these afterwards. As well as for albums/artists containing "/" in the name, so for example for "AC/DC - For those about to rock" the file is called
"DC - For those about to rock.jpg"
and resides in the subfolder
"AC"
This works pretty well with SlimServer when handling all artwork files in a common folder.
I have attached the original script and the modified one so you can see how little modification there is. For the moment I am pretty happy but as I love Amarok as an in-front-of-the-PC-solution and in parallel I am damn happy with my Squeezebox/Nokia 770 combination (thanks so much for the skin by the way!), I am always interested in anything you might do to the Amarok-Squeezebox-"integration" and also willing to join efforts on scripting in case you need some help or some additional opinion!
Hope this is of any help to you!
Cheers,
Sebastian
-
2007-03-24, 16:12 #8Bill MoseleyGuest
Integrating cover art from Amarok
On Thu, Mar 22, 2007 at 07:59:38AM -0700, bklaas wrote:
> hi Bill-
>
> I ran your SQL query without the 'where tags.album = <albumid>' clause
> and all records return the same md5sum. Any ideas there?
Same md5 hash? With Postgresql? Shouldn't be the case.
> I have a script that I used to use for a very, very similar task that
> could be reworked for this purpose. If you want to pool resources, I'm
> game.
Ya, just have to get it back into my schedule.
I have not decided
what I want the script to do.
Since Amarok uses the id3 tags to generate artist and album (and thus
the md5 has) I suppose it makes sense to scan all directories and
generate sums for all audio files (ignoring duplicates) then look for
the cover art in the amarok directory. Copy the image to the
directory and also create a thumbmail at the same time.
What I'm not clear about is what to do if a given directory has more
than one music file that don't agree on Artist/Title tags. IIRC,
Slimserver expects to only fine one art file per directory.
--
Bill Moseley
moseley (AT) hank (DOT) org
-
2007-03-24, 16:35 #9
Hi Bill,
maybe this doesn't catch the point for you, but just as an alternative train of thought:
You don't necessarily have to use artwork by putting an album.jpg or whatever into each album's folder. You can also use one common folder where all the artwork files are stored together using a naming scheme that identifies them uniquely. With this you don't get into any hassle when concurrent Album/Artist information is stored in the same album folder.
The necessary information for this is anyway already there as you read the Album/Artist tags. Of course, I admit there might be other drawbacks with this method, at least for me (as I wrote: ~1000 albums and very few "various artists" ones) this works pretty well...
Cheers,
Sebastian
-
2007-05-17, 16:16 #10Member
- Join Date
- Jan 2006
- Posts
- 98
There might be an easier way to do this. I had a hard time following this thread, but there's a Rockbox script which takes the image and puts it into the directory where the media is located. I haven't used it, but if it does what it says it does, it would work. Look here for info:
http://amarok.kde.org/wiki/Scripts
I may play around with it and see if it works. Probably later have to rename all the files to folder.jpg or something like that

Reply With Quote
