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

How to tag songs within a script in Amarok 2.0?

Tags: None
(comma "," separated)
User avatar
gaillou
Registered Member
Posts
22
Karma
0
OS
Hi everybody, I've started writing a script that looks for the tracks info on discogs.
I was currently able to retrieve informations and to display them and I was wondering if there's a simple way to edit tag info with Amarok's methods or if it's necessary  to use an external app  to do the tagging work?
User avatar
gaillou
Registered Member
Posts
22
Karma
0
OS
So here's what I've done so far :


for(i=0;(i {
Amarok.Playlist.trackAt(i).title=discogs.elementsByTagName( "track" ).at(i).firstChildElement( "title").text();
}

So this way the track is well tagged inside Amarok however the mp3 file isn't modified and if I do sth like  "touch file.mp3" then Amarok retrieves the original tags. The only way I found to have the tags written into the file is to modify them manually after and to save the changes. So is there a way to tell amarok to write the tags into the file inside my script ??
User avatar
markey
KDE Developer
Posts
2286
Karma
3
OS
The whole current scripting API is listed here:

http://amarok.kde.org/wiki/Development/ ... _HowTo_2.0


If you would like to request enhancements to the API, please report a wish on bugs.kde.org.


--
Mark Kretschmann - Amarok Developer
User avatar
gaillou
Registered Member
Posts
22
Karma
0
OS
This issue seems to have been fixed in SVN version. I hope the new version will be released quickly in order to publish my discogs script. Thanks.
User avatar
gaillou
Registered Member
Posts
22
Karma
0
OS
Sorry to bother you with my questions :D but is there a variable that corresponds to the disc number ? I can't find any info on this in the doc.
User avatar
gaillou
Registered Member
Posts
22
Karma
0
OS
I'm sorry it was discNumber with a capital N :D
User avatar
markey
KDE Developer
Posts
2286
Karma
3
OS
Sorry, I don't know this. All API details should be listed in our Scripting HowTo.


--
Mark Kretschmann - Amarok Developer
User avatar
eean
KDE Developer
Posts
1016
Karma
0
OS
gaillou wrote:This issue seems to have been fixed in SVN version. I hope the new version will be released quickly in order to publish my discogs script. Thanks.

The issue wasn't fixed in SVN, as far as I could tell. Amarok wasn't writing changes to metadata to the file when edited from QtScript.

However I just committed the fix.


Amarok Developer
User avatar
gaillou
Registered Member
Posts
22
Karma
0
OS
Ok thanks.


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], daret, Evergrowing, Google [Bot], lockheed, sandyvee, Sogou [Bot]