Bug 184325 - amarok wish: fetch lyrics from the ID3 lyrics tag

Be be.0 at gmx.com
Sat Jan 31 23:50:12 UTC 2015


Nice, it works now. I think this implementation is awkward though. I
don't think this should be left to each individual lyrics script to
implement. Rather, Amarok should check if the file has lyrics in the
tags first, then only run a lyrics script if the file does not have a
lyrics tag (perhaps there could be a checkbox to disable this in
Amarok's configuration). Also, the Lyrics tab in the Track Details
dialog is confusing. I think it should be used for editing lyrics tags
in files and the lyrics saved in Amarok's database should only be used
to save lyrics retrieved by scripts.

On 01/31/2015 02:46 PM, Anmol Ahuja wrote:
>> This does not work for me. Inserting Amarok.debug(embeddedLyrics); in
>> this function in the Lyricwiki script prints an empty line in the
>> debugging output even if there is a lyrics tag in the file and there are
>> lyrics in Amarok's database.
>>
>> function readEmbeddedLyrics()
>> {
>>     var track = Amarok.Engine.currentTrack();
>>     var embeddedLyrics = track.tags["lyrics"];
>>     if( embeddedLyrics != undefined && embeddedLyrics !== "" )
>>     {
>>         Amarok.debug( "Using embedded lyrics for track \"" + track.title
>> + "\"" );
>>         Amarok.Lyrics.showLyricsHtml( embeddedLyrics );
>>         return true;
>>     }
>>     return false;
>> }
> Hey,
> sorry, about that. I somehow seem to have missed something from my
> gsoc branch. Committed now.
>
> By the way, tracks are resolved asynchronously, you should check if it
> has loaded before using it (unneeded for the currently playing one):
> if( !track.isLoaded )
>      track.loaded.connect( <your function> );
>  else
>      <your function>( track );
>
>
> --
> Regards,
> Anmol Ahuja
> _______________________________________________
> Amarok-devel mailing list
> Amarok-devel at kde.org
> https://mail.kde.org/mailman/listinfo/amarok-devel



More information about the Amarok-devel mailing list