diff options
| author | woro <woro@e10066b5-e1e2-0310-b819-94efdf66514b> | 2008-04-13 16:20:52 +0000 |
|---|---|---|
| committer | woro <woro@e10066b5-e1e2-0310-b819-94efdf66514b> | 2008-04-13 16:20:52 +0000 |
| commit | 91c359fdb2a425f84972aeb090372471ddb79365 (patch) | |
| tree | 5b3d8dc834a04e71d5946deb268ba0649162293f | |
| parent | ad9f09b07b3e7019a4a885cefae228463334d534 (diff) | |
| download | vdr-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-- | HISTORY | 3 | ||||
| -rw-r--r-- | lyrics.c | 8 |
2 files changed, 10 insertions, 1 deletions
@@ -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 @@ -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; |
