This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Id3 Cover Fetcher Script

Tags: None
(comma "," separated)
erzapito
Registered Member
Posts
5
Karma
0
OS

Id3 Cover Fetcher Script

Fri Jan 22, 2010 10:13 pm
Hi, I am trying to develop a script to get de cover from the id3 tags, but I got a couple of questions.

1) To get the information about the current playing track in the DB I use the "path" to obtain the "url id" and, finally, the "track id". I think this is not the best way to get this info, so... ¿another way, please?

2) The images stored in disk have some kind of hash format i'm not able to understand. I was thinking that my script should store the images in the same way as amarok does when it downloads a cover from the web. ¿Could anybody explain how to generate this hash name?

Thank you very much.
User avatar
markey
KDE Developer
Posts
2286
Karma
3
OS

Re: Id3 Cover Fetcher Script

Sat Jan 23, 2010 8:07 am
erzapito wrote:2) The images stored in disk have some kind of hash format i'm not able to understand. I was thinking that my script should store the images in the same way as amarok does when it downloads a cover from the web. ¿Could anybody explain how to generate this hash name?.

Sure. In Ruby code it looks like this (I guess you can translate that to JavaScript easily):

Code: Select all
MD5.hexdigest( "#{artist.downcase()}#{album.downcase()}" )


--
Mark Kretschmann - Amarok Developer
erzapito
Registered Member
Posts
5
Karma
0
OS

Re: Id3 Cover Fetcher Script

Sat Jan 23, 2010 4:44 pm
That was it, thanks.
erzapito
Registered Member
Posts
5
Karma
0
OS

Re: Id3 Cover Fetcher Script

Sat Feb 06, 2010 3:42 pm
Hello again, I'm finishing the script and last thing to do is to place the image in the coveart folder. I'm using the "Amarok Script Console" and I don't know how to get this folder. Could anybody give me a suggestion, please?


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], Sogou [Bot]