summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorworo <woro@e10066b5-e1e2-0310-b819-94efdf66514b>2008-04-13 16:20:52 +0000
committerworo <woro@e10066b5-e1e2-0310-b819-94efdf66514b>2008-04-13 16:20:52 +0000
commit91c359fdb2a425f84972aeb090372471ddb79365 (patch)
tree5b3d8dc834a04e71d5946deb268ba0649162293f
parentad9f09b07b3e7019a4a885cefae228463334d534 (diff)
downloadvdr-plugin-muggle-91c359fdb2a425f84972aeb090372471ddb79365.tar.gz
vdr-plugin-muggle-91c359fdb2a425f84972aeb090372471ddb79365.tar.bz2
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) git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@1183 e10066b5-e1e2-0310-b819-94efdf66514b
-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;