Labeler

Amarok 2.x Scripts

Source (required if based on other people's work):

0
Score 61%
Description:

Labeler is a small Amarok script that will help you mass label and quickly manage labels on your collection tracks. Labeler is performance-optimized and works really well even when labeling tens of thousands of tracks.
Last changelog:

8 years ago

New feature: export labels as M3U playlists. Bug fix: selecting the same track multiple times and launching the labeler no longer causes an error.

mdr13

6 years ago

The link to the script seems down. Anyone can point me to a working link? Thanks!

Report

C

Rudd-O

6 years ago

I have fixed the download.

Report

mdr13

6 years ago

thank you, Rudd-O! The script works like a charm :-)

Report

Xiyizi

8 years ago

I get a similar problem as the guy further down this page. I am running Amarok 2.3.1 on Debian Sid, with the latest versions of this script and the qt library installed, and every time I try to use the script to edit the labels, I get,

Quote:Unexpected exception: Unexpected keys.length != res.length: 1 0. Check the debug log for info

The output from the script log is exactly the same each time:

Quote:SQL query: select sum(id) from urls
SQL query: select sum(id) from labels
SQL query: select concat(sum(url),sum(label)) from urls_labels
SQL query: select label from labels
SQL query: select id,label from labels where label in ('fuzzy','rock','weird')
SQL query: select id,rpath from urls where rpath in ('./media/music/bright_eyes/2002--Lifted or the Story Is in the Soil, Keep Your Ear to the Ground/03 False Advertising.mp3')
'./media/music/bright_eyes/2002--Lifted or the Story Is in the Soil, Keep Your Ear to the Ground/03 False Advertising.mp3' not in res

It happens every time. I thought it might be the external MySQL database I use for my collection, but it happens when I use Amarok without the database as well. The songs I am playing are all definitely in my library.

Although oddly, the few labels I have made manually do not appear in the drop-down menu in the Edit Track Details menu. Perhaps there is some relation?

I would be grateful if you could provide any assistance.

Report

Morgenstern

8 years ago

I've been waiting for something like this for ages so i really thank you!
Anyway, by now i can't get it work...
Everything i get, both trying with "menage label of selected tracks" and "menage labels of playing track", is
"Unexpected exception: Unexpected keys.length != res.length: 1 0. Check the debug log for info."
Where "1" is the number of tracks selected or playing...
What does it mean?

Anyway, i really really thank you!

Report

C

Rudd-O

8 years ago

thanks.

send me the log (script.log inside the script's folder, that is usually .kde/share/apps/amarok/scripts/labeler ).

in all likelihood, the labeler is telling you with this cryptic message that the tracks you selected are not in your collection / cannot be found in your collection (in which case they cannot be labeled as far as I know because the labels only work for collection tracks). you would also need to send me a dump of your database if you want a faster diagnosis.

Report

Morgenstern

8 years ago

Here is my script.log

SQL query: select sum(id) from urls
SQL query: select sum(id) from labels
SQL query: select concat(sum(url),sum(label)) from urls_labels
SQL query: select label from labels
SQL query: select id,label from labels where label in ('alternative','alternative metal','alternative rock ','ambient','american','atmospheric black metal','atmospheric death metal','avant-garde','avant-garde black metal','avant-garde clack metal','black metal','british','britpop ','brtish','canadian','cantautore','celtic','chillout','classical','dark metal','death metal','doom metal','electronic ','electronic rock','ethereal ','experimental','finnish','finnish metal ','folk metal','french','goliardica','gothenburg metal','greek','hard rock','heavy metal','hip-hop','indie','instrumental','italian','italian hip-hop','italian pop ','italian punk','italian rap','italian rock','japanese','jazz ','jazz metal ','malinconia','melodic black metal','melodic death metal','metal','new age','new-age','norwegian','norwegian black metal','nu metal','piano','polish ','political','pop punk','power metal','progressive death metal','progressive metal','progressive rock','psychedelic','psychedelic black metal','punk','punk rock','radio','rap','rock','rock fm','russian','singer-songwriter','ska ','ska-punk','soundtrack','swedish','symphonic black metal','technical death metal','true black metal','viking metal','zena','zeneize')
SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/iTaLiAna/Subsonica/AmOrEmaTiCo/05 subsonica - nuova ossessione.mp3')
SQL query: select sum(id) from urls
SQL query: select sum(id) from labels
SQL query: select concat(sum(url),sum(label)) from urls_labels
SQL query: select label from labels
SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/rOcK/ALTERNATIVE/ChEveLLe/Chevelle - Vena Sera (2007)/Chevelle - Midnight to Midnight.mp3')
SQL query: select sum(id) from urls
SQL query: select sum(id) from labels
SQL query: select concat(sum(url),sum(label)) from urls_labels
SQL query: select label from labels
SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/rOcK/ALTERNATIVE/ChEveLLe/Chevelle - Vena Sera (2007)/Chevelle - Midnight to Midnight.mp3')
SQL query: select sum(id) from urls
SQL query: select sum(id) from labels
SQL query: select concat(sum(url),sum(label)) from urls_labels
SQL query: select label from labels
SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/rOcK/ALTERNATIVE/ChEveLLe/Chevelle - Vena Sera (2007)/Chevelle - Midnight to Midnight.mp3')
SQL query: select sum(id) from urls
SQL query: select sum(id) from labels
SQL query: select concat(sum(url),sum(label)) from urls_labels
SQL query: select label from labels
SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/Elettronica/VANGELIS COLLECTION (52 albums)-OZM/2004 Alexander (Limited Edition)/13 Across The Mountains.mp3','./media/disk1part3/SILVIA/Musica/rOcK/ALTERNATIVE/ChEveLLe/Chevelle - Vena Sera (2007)/Chevelle - Midnight to Midnight.mp3','./media/disk1part3/SILVIA/Musica/iTaLiAna/MCR/09_Transamerika.mp3')
SQL query: select sum(id) from urls
SQL query: select sum(id) from labels
SQL query: select concat(sum(url),sum(label)) from urls_labels
SQL query: select label from labels
SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/iTaLiAna/MCR/09_Transamerika.mp3')
SQL query: select sum(id) from urls
SQL query: select sum(id) from labels
SQL query: select concat(sum(url),sum(label)) from urls_labels
SQL query: select label from labels
SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/rOcK/ALTERNATIVE/ChEveLLe/Chevelle - Vena Sera (2007)/Chevelle - Midnight to Midnight.mp3')
SQL query: select sum(id) from urls
SQL query: select sum(id) from labels
SQL query: select concat(sum(url),sum(label)) from urls_labels
SQL query: select label from labels
SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/rOcK/ALTERNATIVE/ChEveLLe/Chevelle - Vena Sera (2007)/Chevelle - Midnight to Midnight.mp3')
SQL query: select sum(id) from urls
SQL query: select sum(id) from labels
SQL query: select concat(sum(url),sum(label)) from urls_labels
SQL query: select label from labels
SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/mETaL/BLACK/SYMPHONIC/diMmu BoRGir/Dimmu Borgir - Death Cult Armageddon/Dimmu Borgir - Heavenly Perverse.mp3','./media/disk1part3/SILVIA/Musica/CoLonNE sOnOrE/Notre Dame de Paris - FR/Notre Dame de Paris-disk1/05. Bohemienne.mp3','./media/disk1part3/SILVIA/Musica/iTaLiAna/Subsonica/AmOrEmaTiCo/05 subsonica - nuova ossessione.mp3','./media/disk1part3/SILVIA/Musica/Elettronica/VANGELIS COLLECTION (52 albums)-OZM/2004 Alexander (Limited Edition)/13 Across The Mountains.mp3','./media/disk1part3/SILVIA/Musica/rOcK/ALTERNATIVE/ChEveLLe/Chevelle - Vena Sera (2007)/Chevelle - Midnight to Midnight.mp3','./media/disk1part3/SILVIA/Musica/iTaLiAna/MCR/09_Transamerika.mp3')
SQL query: select sum(id) from urls
SQL query: select sum(id) from labels
SQL query: select concat(sum(url),sum(label)) from urls_labels
SQL query: select label from labels
SQL query: select id,label from labels where label in ('alternative','alternative metal','alternative rock ','ambient','american','atmospheric black metal','atmospheric death metal','avant-garde','avant-garde black metal','avant-garde clack metal','black metal','british','britpop ','brtish','canadian','cantautore','celtic','chillout','classical','combat folk','dark metal','death metal','doom metal','electronic ','electronic rock','ethereal ','experimental','finnish','finnish metal ','folk','folk metal','folk rock','french','goliardica','gothenburg metal','greek','hard rock','heavy metal','hip-hop','indie','instrumental','italian','italian hip-hop','italian pop ','italian punk','italian rap','italian rock','japanese','jazz ','jazz metal ','malinconia','melodic black metal','melodic death metal','metal','new age','new-age','norwegian','norwegian black metal','nu metal','piano','polish ','political','pop punk','power metal','progressive death metal','progressive metal','progressive rock','psychedelic','psychedelic black metal','punk','punk rock','radio','rap','rock','rock fm','russian','singer-songwriter','ska ','ska-punk','soundtrack','swedish','symphonic black metal','technical death metal','true black metal','viking metal','zena','zeneize')
SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/mETaL/BLACK/AVANTGARDE/Ulver/Ulver - Shadows of the sun/02 - Ulver - Hymn II - Of Wolf and the Devil.mp3')
SQL query: select sum(id) from urls
SQL query: select sum(id) from labels
SQL query: select concat(sum(url),sum(label)) from urls_labels
SQL query: select label from labels
SQL query: select id,label from labels where label in ('alternative','alternative metal','alternative rock ','ambient','american','atmospheric black metal','atmospheric death metal','avant-garde','avant-garde black metal','avant-garde clack metal','black metal','british','britpop ','brtish','canadian','cantautore','celtic','chillout','classical','combat folk','dark metal','death metal','doom metal','electronic ','electronic rock','ethereal ','experimental','finnish','finnish metal ','folk','folk metal','folk rock','french','goliardica','gothenburg metal','greek','hard rock','heavy metal','hip-hop','indie','instrumental','italian','italian hip-hop','italian pop ','italian punk','italian rap','italian rock','japanese','jazz ','jazz metal ','malinconia','melodic black metal','melodic death metal','metal','new age','new-age','norwegian','norwegian black metal','nu metal','piano','polish ','political','pop punk','power metal','progressive death metal','progressive metal','progressive rock','psychedelic','psychedelic black metal','punk','punk rock','radio','rap','rock','rock fm','russian','singer-songwriter','ska ','ska-punk','soundtrack','swedish','symphonic black metal','technical death metal','true black metal','viking metal','zena','zeneize')
SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/mETaL/NU/LiNKin PArk/mETeORa - LinKin PaRK - LYNG froM YoU-meTeorA_LinKin paRK.mp3')
SQL query: select sum(id) from urls
SQL query: select sum(id) from labels
SQL query: select concat(sum(url),sum(label)) from urls_labels
SQL query: select label from labels
SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/mETaL/NU/LiNKin PArk/mETeORa - LinKin PaRK - LYNG froM YoU-meTeorA_LinKin paRK.mp3')
SQL query: select sum(id) from urls
SQL query: select sum(id) from labels
SQL query: select concat(sum(url),sum(label)) from urls_labels
SQL query: select label from labels
SQL query: select id,label from labels where label in ('alternative','alternative metal','alternative rock ','ambient','american','atmospheric black metal','atmospheric death metal','avant-garde','avant-garde black metal','avant-garde clack metal','black metal','british','britpop ','brtish','canadian','cantautore','celtic','chillout','classical','combat folk','dark metal','death metal','doom metal','electronic ','electronic rock','ethereal ','experimental','finnish','finnish metal ','folk','folk metal','folk rock','french','goliardica','gothenburg metal','greek','hard rock','heavy metal','hip-hop','indie','instrumental','italian','italian hip-hop','italian pop ','italian punk','italian rap','italian rock','japanese','jazz ','jazz metal ','malinconia','melodic black metal','melodic death metal','metal','new age','new-age','norwegian','norwegian black metal','nu metal','piano','polish ','political','pop punk','power metal','progressive death metal','progressive metal','progressive rock','psychedelic','psychedelic black metal','punk','punk rock','radio','rap','rock','rock fm','russian','singer-songwriter','ska ','ska-punk','soundtrack','swedish','symphonic black metal','technical death metal','true black metal','viking metal','zena','zeneize')
SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/GeNEriCA/SinGoLi/skape - Planeta Escoria.mp3')
SQL query: select sum(id) from urls
SQL query: select sum(id) from labels
SQL query: select concat(sum(url),sum(label)) from urls_labels
SQL query: select label from labels
SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/mETaL/PROGRESSIVE/DreAM THeaTEr/Dream Theater - Metropolis PT2 - Scenes from a Memory, 1999[MP3]-(320kbps) - Ovelha/08 Scene Six- Home.mp3')
SQL query: select sum(id) from urls
SQL query: select sum(id) from labels
SQL query: select concat(sum(url),sum(label)) from urls_labels
SQL query: select label from labels
SQL query: select id,label from labels where label in ('alternative','alternative metal','alternative rock ','ambient','american','atmospheric black metal','atmospheric death metal','avant-garde','avant-garde black metal','avant-garde clack metal','black metal','british','britpop ','brtish','canadian','cantautore','celtic','chillout','classical','combat folk','dark metal','death metal','doom metal','electronic ','electronic rock','ethereal ','experimental','finnish','finnish metal ','folk','folk metal','folk rock','french','goliardica','gothenburg metal','greek','hard rock','heavy metal','hip-hop','indie','instrumental','italian','italian hip-hop','italian pop ','italian punk','italian rap','italian rock','japanese','jazz ','jazz metal ','malinconia','melodic black metal','melodic death metal','metal','new age','new-age','norwegian','norwegian black metal','nu metal','piano','polish ','political','pop punk','power metal','progressive death metal','progressive metal','progressive rock','psychedelic','psychedelic black metal','punk','punk rock','radio','rap','rock','rock fm','russian','singer-songwriter','ska ','ska-punk','soundtrack','swedish','symphonic black metal','technical death metal','true black metal','viking metal','zena','zeneize')
SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/CoLonNE sOnOrE/DaRedAviL/03-saliva-bleed_for_me-its.mp3')


About my collection and my database, what i can say is that it's on an NTFS windows shared partition; could this be a problem?

Tnx for help!

Report

C

Rudd-O

8 years ago

you see this?

SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/CoLonNE sOnOrE/DaRedAviL/03-saliva-bleed_for_me-its.mp3')

If this query is failing and returning no results (it appears that it should), you would have to go and inspect your database with the Amarok Script Console script or something like that. One reason why that query may be failing is because that track is not in your collection. And non-collection tracks are not supported.

Report

C

Rudd-O

8 years ago

I may have fixed your bug in the latest release. Update amarok qtscript library and labeler.

Report

bitcrazy

8 years ago

No, and no.
The error is still present. Labeler and qtscript altest versions.
Tested with tracks, which are definitely in the collection

Report

C

Rudd-O

8 years ago

I dunno what else is wrong then. I would need a copy of your script.log and a copy of your mysqle directory within .kde/share/apps/amarok to diagnose this, and a copy of your current.xspf file as well, see what is wrong.

Report

C

Rudd-O

8 years ago

oh, the log output should now have more information about WHICH files were not found. That is good. Send me that log output!

Report

Morgenstern

8 years ago

Even with latest release i've still got that error.

Here is my new script.log

SQL query: select sum(id) from urls
SQL query: select sum(id) from labels
SQL query: select concat(sum(url),sum(label)) from urls_labels
SQL query: select label from labels
SQL query: select id,label from labels where label in ('alternative','alternative metal','alternative rock ','ambient','american','atmospheric black metal','atmospheric death metal','avant-garde','avant-garde black metal','avant-garde clack metal','black metal','british','britpop ','brtish','canadian','cantautore','celtic','chillout','classical','combat folk','dark metal','death metal','doom metal','electronic ','electronic rock','ethereal ','experimental','finnish','finnish metal ','folk','folk metal','folk rock','french','goliardica','gothenburg metal','greek','hard rock','heavy metal','hip-hop','indie','instrumental','italian','italian hip-hop','italian pop ','italian punk','italian rap','italian rock','japanese','jazz ','jazz metal ','malinconia','melodic black metal','melodic death metal','metal','new age','new-age','norwegian','norwegian black metal','nu metal','piano','polish ','political','pop punk','power metal','progressive death metal','progressive metal','progressive rock','psychedelic','psychedelic black metal','punk','punk rock','radio','rap','rock','rock fm','russian','singer-songwriter','ska ','ska-punk','soundtrack','swedish','symphonic black metal','technical death metal','true black metal','viking metal','zena','zeneize')
SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/mETaL/HEAVY/iRoN MaiDeN/05 - Seventh Son of a Seventh Son.mp3')
'./media/disk1part3/SILVIA/Musica/mETaL/HEAVY/iRoN MaiDeN/05 - Seventh Son of a Seventh Son.mp3' not in res
SQL query: select sum(id) from urls
SQL query: select sum(id) from labels
SQL query: select concat(sum(url),sum(label)) from urls_labels
SQL query: select label from labels
SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/mETaL/NU/LiNKin PArk/mETeORa - LinKin PaRK - eaSiEr To rUN-MEtEORa_LinKiN PArK.mp3')
'./media/disk1part3/SILVIA/Musica/mETaL/NU/LiNKin PArk/mETeORa - LinKin PaRK - eaSiEr To rUN-MEtEORa_LinKiN PArK.mp3' not in res
SQL query: select sum(id) from urls
SQL query: select sum(id) from labels
SQL query: select concat(sum(url),sum(label)) from urls_labels
SQL query: select label from labels
SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/mETaL/PROGRESSIVE/OpEtH/Opeth - Blackwater Park - 09 - Still Day Beneath The Sun.mp3')
'./media/disk1part3/SILVIA/Musica/mETaL/PROGRESSIVE/OpEtH/Opeth - Blackwater Park - 09 - Still Day Beneath The Sun.mp3' not in res

How can i send you the whole mysqle directory?
Tnx for help!

Report

C

Rudd-O

8 years ago

See this?

SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/mETaL/HEAVY/iRoN MaiDeN/05 - Seventh Son of a Seventh Son.mp3')
'./media/disk1part3/SILVIA/Musica/mETaL/HEAVY/iRoN MaiDeN/05 - Seventh Son of a Seventh Son.mp3' not in res
SQL query: select sum(id) from urls
SQL query: select sum(id) from labels
SQL query: select concat(sum(url),sum(label)) from urls_labels
SQL query: select label from labels
SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/mETaL/NU/LiNKin PArk/mETeORa - LinKin PaRK - eaSiEr To rUN-MEtEORa_LinKiN PArK.mp3')
'./media/disk1part3/SILVIA/Musica/mETaL/NU/LiNKin PArk/mETeORa - LinKin PaRK - eaSiEr To rUN-MEtEORa_LinKiN PArK.mp3' not in res
SQL query: select sum(id) from urls
SQL query: select sum(id) from labels
SQL query: select concat(sum(url),sum(label)) from urls_labels
SQL query: select label from labels
SQL query: select id,rpath from urls where rpath in ('./media/disk1part3/SILVIA/Musica/mETaL/PROGRESSIVE/OpEtH/Opeth - Blackwater Park - 09 - Still Day Beneath The Sun.mp3')
'./media/disk1part3/SILVIA/Musica/mETaL/PROGRESSIVE/OpEtH/Opeth - Blackwater Park - 09 - Still Day Beneath The Sun.mp3' not in res

Those three tracks are not in your collection -- they are not in the urls table. Tried updating your collection already?

You can zip up your mysqle directory, send it to me over email (my web site and project site for this plugin have the email address listed as contact).

Report

Morgenstern

8 years ago

Yes, i already updated my collection.
Sorry, on your personal website i can't find your email.
In contact section there's only a form for writing simple emails without any attachment...

Report

andreaskai

8 years ago

really nice tool.

two questions:

1. is it possible to integrate hotkeys
2. synchronization with the nepomuk labels would be nice

thanks a lot

Report

C

Rudd-O

8 years ago

What do you mean hotkeys? You can assign shortcut keys to the labeler menu items within Amarok, just fine, but unfortunately those are not saved and will be erased when Amarok restarts. File a bug against amarok on bugs.kde.org to have them fix it.

As for Nepomuk labels... that would be a fantastic idea but that's a bit too much work for my time. I can take patches, though. :-)

Report

andreaskai

8 years ago

1. Shortcut's
Sorry I mean shortcut's. It would be realy nice to have the opportunity to use shortcut's. In the kde forum you can read my idea about file tagging.
http://forum.kde.org/brainstorm.php#idea89188_page1

2. Nepomuk
As you say it would be fantastic I also think that it would be a nice feature, but I can't send you patches, because I'm only a user. Sorry
DigiKam synchronize the tags, when you say yes at the tagging options. Maybe you can use the code from there. I really don't know. Sorry I'm no coder.

Report

C

Rudd-O

8 years ago

sounds reasonable to me. at some point I will add a feature to add menu entries in Tools for specific tags, so you can quickly tag and untag the song that is playing.

Report

andreaskai

8 years ago

A nice think for using tags:
http://forum.kde.org/viewtopic.php?f=115&t=89103

Report

EinfachToll

8 years ago

Good work! I was looking a long time for something like this.
3 remarks:
- If you have selected just one track, you have no grouping (what is feasible), but you can mark a label with this dotted tick by clicking once on the box, which makes no sense.
- The “Help” button is cut at the bottom because it is slightly too below (just some pixel).
- When you change some labels, the changes are applied to the database, but amarok itself does not recognize it before a restart. I don't know if you can make amarok “reload” the database, but this would be nice.

Report

C

Rudd-O

8 years ago

Thanks!

1. you mean the tristate checkbox? it should be easy to fix -- the checkbox for the label should not be made tristate if one is dealing with only one track. patches welcome! (search for "tristate" in the source)

2. Donno how to fix the help button issue. I use a qbuttonbox and it somehow misaligns the added qpushbutton.

3 Oh I tried so hard to do that, but I could not. Even touching the files and rescanning collection has no effect. So I filed a bug request to improve the scripting API for this.

Report

C

Rudd-O

8 years ago

Oh, also rate the script positively plz :-D

Report

8 years ago

New feature: export labels as M3U playlists. Bug fix: selecting the same track multiple times and launching the labeler no longer causes an error.

File (click to download) Version Description Packagetype Architecture Downloads Date Filesize DL OCS-Install
Pling
Details
license
version
0.3.2
updated Feb 19 2012
added Jul 28 2010
downloads today
0
page views today 1
System Tags addon