summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLarsAC <LarsAC@e10066b5-e1e2-0310-b819-94efdf66514b>2005-10-08 08:17:03 +0000
committerLarsAC <LarsAC@e10066b5-e1e2-0310-b819-94efdf66514b>2005-10-08 08:17:03 +0000
commit1fa61b697e6114ab5eae6fd2b9e5509dd6df38bc (patch)
treec90c141d03de5b8c6415b50857656f7879da964c
parent65618a7067e204e9113dbbf85235eb30111dfafd (diff)
downloadvdr-plugin-muggle-1fa61b697e6114ab5eae6fd2b9e5509dd6df38bc.tar.gz
vdr-plugin-muggle-1fa61b697e6114ab5eae6fd2b9e5509dd6df38bc.tar.bz2
Only add pics to list of files that have been successfully converted
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@860 e10066b5-e1e2-0310-b819-94efdf66514b
-rw-r--r--mg_image_provider.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/mg_image_provider.c b/mg_image_provider.c
index 1aeb9a6..cb60363 100644
--- a/mg_image_provider.c
+++ b/mg_image_provider.c
@@ -208,11 +208,14 @@ void mgImageProvider::Action()
asprintf( &tmp, "image_convert.sh \"%s\" \"%s\"", filename.c_str(), tmpFile.c_str() );
system( (const char*) tmp );
free(tmp);
-
- // add to the list of converted images
- Lock();
- m_converted_images.push_back( tmpFile );
- Unlock();
+
+ // if file can be read by process, add to the list of converted images
+ if( !access( tmpFile.c_str(), R_OK ) )
+ {
+ Lock();
+ m_converted_images.push_back( tmpFile );
+ Unlock();
+ }
}
// Check whether we need to continue this!? Next song may be playing already...