diff options
| author | woro <woro@e10066b5-e1e2-0310-b819-94efdf66514b> | 2008-04-22 06:39:13 +0000 |
|---|---|---|
| committer | woro <woro@e10066b5-e1e2-0310-b819-94efdf66514b> | 2008-04-22 06:39:13 +0000 |
| commit | 7270e75552318e948eca64b591a21ef8a70430ec (patch) | |
| tree | bcf728c17de9ed7757edfc2a8ffbc2c1fbe0a658 | |
| parent | e14cfef65a02ad61c5292f0acc24513bb43cde07 (diff) | |
| download | vdr-plugin-muggle-7270e75552318e948eca64b591a21ef8a70430ec.tar.gz vdr-plugin-muggle-7270e75552318e948eca64b591a21ef8a70430ec.tar.bz2 | |
get lyrics with vdr before 1.5.4: also in the background by using system() instead of SystemExec()
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@1204 e10066b5-e1e2-0310-b819-94efdf66514b
| -rw-r--r-- | lyrics.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -15,15 +15,21 @@ int mgLyrics::RunCommand(const string cmd) { int res=-1; if (access(cmd.c_str(),R_OK|X_OK)) return res; char *tmp; - msprintf(&tmp,"%s \"%s\" \"%s\" \"%s\"",cmd.c_str(), +#if VDRVERSNUM < 10504 + const char *backgr="&"; +#else + const char *backgr=""; +#endif + msprintf(&tmp,"%s \"%s\" \"%s\" \"%s\" %s",cmd.c_str(), playItem->getArtist().c_str(), playItem->getTitle().c_str(), - playItem->getCachedFilename("lyrics.tmp").c_str()); + playItem->getCachedFilename("lyrics.tmp").c_str(), + backgr); mgDebug(1,"muggle[%d]: lyrics: executing '%s'\n",getpid (), tmp); #if VDRVERSNUM >= 10504 res=SystemExec(tmp,true); // run detached #else - res=SystemExec(tmp); + res=system(tmp); // SystemExec cannot yet run detached #endif free(tmp); return res; |
