diff options
author | woro <woro@e10066b5-e1e2-0310-b819-94efdf66514b> | 2008-04-14 05:29:35 +0000 |
---|---|---|
committer | woro <woro@e10066b5-e1e2-0310-b819-94efdf66514b> | 2008-04-14 05:29:35 +0000 |
commit | e615838ce8c4e687db2c84293b8c5fd97d820767 (patch) | |
tree | 1eb4bd351d7aae2c3a4bcb3323ffe6b414424c2a | |
parent | 91c359fdb2a425f84972aeb090372471ddb79365 (diff) | |
download | vdr-plugin-muggle-e615838ce8c4e687db2c84293b8c5fd97d820767.tar.gz vdr-plugin-muggle-e615838ce8c4e687db2c84293b8c5fd97d820767.tar.bz2 |
lyrics: compat mode for versions before 1.5.4
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@1184 e10066b5-e1e2-0310-b819-94efdf66514b
-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)) { |