Bug 195213 - Lyrics saved in "edit track details" are deleted
Summary: Lyrics saved in "edit track details" are deleted
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 2.1
Platform: Fedora RPMs Unspecified
: NOR grave
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-04 15:28 UTC by LukasT
Modified: 2009-12-09 11:29 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description LukasT 2009-06-04 15:28:44 UTC
Version:            (using KDE 4.2.3)
Installed from:    Fedora RPMs

Steps to reproduce:
This is the use case for songs that does not have lyrics on the web source of the lyrics applet (http://lyricwiki.org ?)

1. Right-click on track which is playing, Edit Track Details
2. -> Lyrics tab, write something
3. Save&Close
4. Double-click song to see lyrics in lyrics applet
5. Double-click other song and then play song that you entered the lyrics again
6. Lyrics are not there, I see "Lyrics are being fetched" and then "Not Found"

Note: update process amarok 2.0.2-> amarok 2.1 deleted all my manually saved lyrics.
Comment 1 Nikolaj Hald Nielsen 2009-06-10 11:57:02 UTC
SVN commit 979614 by nhnielsen:

Don't overwrite cached lyrics if we get a "Not found" result when looking for lyrics. Instead use whatever is cached (if anything)
Cached lyrics are still overwritten whenever a valid result is found, but what the correct behaviour is in this and many other cases (what to prefer, showing cached or fetched lyrics, when to overwrite cached lyrics, and whetther to search at all if cached lyrics are present) is up for discussion IMO. 
BUG: 195213


 M  +29 -2     context/LyricsManager.cpp  
 M  +1 -0      scriptengine/AmarokLyricsScript.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=979614
Comment 2 LukasT 2009-06-10 12:34:47 UTC
Hi, 

the fix is little crazy :) [ if ( lyrics != "Not found" ) ?]
But thanks for it anyway.

So let's discuss it a little:
If you have something cached, use cache. If you don't have something in cache, try to download the lyrics to cache and use cache. 

Cached lyrics are still overwritten whenever a valid result is found is crazy.
What if the datasource has bad lyrics and I have corrected them localy?

Do you fetch lyrics from net everytime amarok plays song?
I think you would save some traffic too :) And it is faster anyway to use cached lyrics.
Comment 3 Alexander Gavrilov 2009-08-12 21:17:28 UTC
So with the new lyrics script the cached text is now being replaced with:

 Lyrics were not able to be downloaded. Please check your internet connection:
 Could not retrieve lyrics: TypeError: not an object

I suggest that this bug be fixed as requested by the original submitter, i.e. amarok should not overwrite the cached text at all, unless the user explicitly presses the reload button.