diff options
author | woro <woro@e10066b5-e1e2-0310-b819-94efdf66514b> | 2008-04-12 13:25:42 +0000 |
---|---|---|
committer | woro <woro@e10066b5-e1e2-0310-b819-94efdf66514b> | 2008-04-12 13:25:42 +0000 |
commit | 19c178562b1008ad84f11f8c059f66bc798bb361 (patch) | |
tree | df67ab406594ed75ea90fcf905adb43f92b3dbcd | |
parent | 57d7ee812c8be1bd118471512682cb3393ce595f (diff) | |
download | vdr-plugin-muggle-19c178562b1008ad84f11f8c059f66bc798bb361.tar.gz vdr-plugin-muggle-19c178562b1008ad84f11f8c059f66bc798bb361.tar.bz2 |
if lyrics are loaded from internet and no local lyrics exist yet, the are now
saved automatically
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@1175 e10066b5-e1e2-0310-b819-94efdf66514b
-rw-r--r-- | HISTORY | 6 | ||||
-rw-r--r-- | lyrics.c | 27 |
2 files changed, 22 insertions, 11 deletions
@@ -324,4 +324,8 @@ XXXXXXXXXX: Version 0.0.8-ALPHA Cached files are permanently cached. If the last modification of the original image indicates a change, the cached file is regenerated. - import: for flac files, prefer vorbis comments over id3 tags as recommended - by the flac people
\ No newline at end of file + by the flac people + +2008-x-x Version 0.2.1-BETA +- if lyrics are loaded from internet and no local lyrics exist yet, the are now + saved automatically @@ -64,19 +64,26 @@ mgLyrics::Process(eKeys key) { if (!access(playItem->getCachedFilename("lyrics.tmp.loading").c_str(),R_OK)) { state=lyricsLoading; playItem->setCheckedForTmpLyrics(time(0)); - } else if (!access(playItem->getCachedFilename("lyrics.tmp").c_str(),R_OK)) { - state=lyricsLoaded; - playItem->setCheckedForTmpLyrics(0); - } else if (displayItem!=playItem) { - if (!access(playItem->getCachedFilename("lyrics").c_str(),R_OK)) { - state=lyricsSaved; + } else { + bool normfound=!access(playItem->getCachedFilename("lyrics").c_str(),R_OK); + if (!access(playItem->getCachedFilename("lyrics.tmp").c_str(),R_OK)) { playItem->setCheckedForTmpLyrics(0); + state=lyricsLoaded; + if (!normfound) { + SaveExternal(); + state=lyricsSaved; + } + } else if (displayItem!=playItem) { + if (normfound) { + state=lyricsSaved; + playItem->setCheckedForTmpLyrics(0); + } else { + LoadExternal(); + } } else { - LoadExternal(); + state=lyricsSaved; + playItem->setCheckedForTmpLyrics(0); } - } else { - state=lyricsSaved; - playItem->setCheckedForTmpLyrics(0); } } if (displayItem!=playItem || state!=prevstate) { |