summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY3
-rw-r--r--lyrics.c8
2 files changed, 10 insertions, 1 deletions
diff --git a/HISTORY b/HISTORY
index fc21453..c588112 100644
--- a/HISTORY
+++ b/HISTORY
@@ -336,3 +336,6 @@ XXXXXXXXXX: Version 0.0.8-ALPHA
match the database, it could happen that we never get anything displayed until
we delete muggle.state and restart muggle. Now muggle goes up to the parent level
- reintroduced Finnish translation
+- if we got lyrics from the net but did not save it, the temporary file .lyrics.tmp
+ will be deleted when the next track starts playing (only while in lyrics mode,
+ if you leave it, the tmp file remains) \ No newline at end of file
diff --git a/lyrics.c b/lyrics.c
index a5c3c59..c8602a5 100644
--- a/lyrics.c
+++ b/lyrics.c
@@ -58,8 +58,14 @@ mgLyrics::SaveExternal() {
eOSState
mgLyrics::Process(eKeys key) {
playItem=mutPlayingItem();
- long cl=playItem->getCheckedForTmpLyrics();
LyricsState prevstate=state;
+ if (displayItem!=playItem && prevstate==lyricsLoaded) {
+ char *cmd;
+ msprintf(&cmd,"rm -f %s",displayItem->getCachedFilename("lyrics.tmp").c_str());
+ SystemExec(cmd,true); // run detached
+ free(cmd);
+ }
+ long cl=playItem->getCheckedForTmpLyrics();
if (displayItem!=playItem || cl>0 && cl<time(0)) {
if (!access(playItem->getCachedFilename("lyrics.tmp.loading").c_str(),R_OK)) {
state=lyricsLoading;