diff options
-rw-r--r-- | HISTORY | 6 | ||||
-rw-r--r-- | lyrics.c | 9 |
2 files changed, 11 insertions, 4 deletions
@@ -338,4 +338,8 @@ XXXXXXXXXX: Version 0.0.8-ALPHA - 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 + if you leave it, the tmp file remains) +- vdr versions before 1.5.4 supported again: With them, lyrics cannot be fetched in the + background. So muggle will not answer to commands until the fetching script has + finished. And the message "loading lyrics" will only appear after they have been + loaded. If you don't like it, update vdr or send me a patch.
\ No newline at end of file @@ -20,7 +20,11 @@ int mgLyrics::RunCommand(const string cmd) { playItem->getTitle().c_str(), playItem->getCachedFilename("lyrics.tmp").c_str()); mgDebug(1,"muggle[%d]: lyrics: executing '%s'\n",getpid (), tmp); +#if VDRVERSNUM >= 10504 res=SystemExec(tmp,true); // run detached +#else + res=SystemExec(tmp); +#endif free(tmp); return res; } @@ -32,8 +36,6 @@ mgLog("LoadExternal"); string script=the_setup.ConfigDirectory + "/scripts/muggle_getlyrics"; if (RunCommand(script)==0) { state=lyricsLoading; -// BlueAction=actNone; -// SetHelpKeys(); playItem->setCheckedForTmpLyrics(time(0)); } } @@ -62,8 +64,9 @@ mgLyrics::Process(eKeys key) { if (displayItem!=playItem && prevstate==lyricsLoaded) { char *cmd; msprintf(&cmd,"rm -f %s",displayItem->getCachedFilename("lyrics.tmp").c_str()); - SystemExec(cmd,true); // run detached + SystemExec(cmd); free(cmd); + state=lyricsSaved; } long cl=playItem->getCheckedForTmpLyrics(); if (displayItem!=playItem || cl>0 && cl<time(0)) { |