
Labeler
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
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.
9 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.
9 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
9 years ago
Report
Rudd-O
9 years ago
Report
mdr13
9 years ago
Report
Xiyizi
10 years ago
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
10 years ago
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
Rudd-O
10 years ago
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
10 years ago
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
Rudd-O
10 years ago
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
10 years ago
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
Rudd-O
10 years ago
Report
bitcrazy
10 years ago
The error is still present. Labeler and qtscript altest versions.
Tested with tracks, which are definitely in the collection
Report
Rudd-O
10 years ago
Report
Morgenstern
10 years ago
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
Rudd-O
10 years ago
Report
Rudd-O
10 years ago
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
andreaskai
10 years ago
two questions:
1. is it possible to integrate hotkeys
2. synchronization with the nepomuk labels would be nice
thanks a lot
Report
Rudd-O
10 years ago
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
10 years ago
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
Rudd-O
10 years ago
Report
andreaskai
10 years ago
http://forum.kde.org/viewtopic.php?f=115&t=89103
Report
EinfachToll
10 years ago
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
Rudd-O
10 years ago
Report
Rudd-O
10 years ago
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