imdb: fix deletion of posterfile

Origin commit data
------------------
Commit: cd45c8dd69
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-08-02 (Tue, 02 Aug 2016)

Origin message was:
------------------
- imdb: fix deletion of posterfile
This commit is contained in:
vanhofen
2016-08-02 13:30:17 +02:00
parent cf5fb865fa
commit 45aadc1654

View File

@@ -316,9 +316,9 @@ int CIMDB::getIMDb(const std::string& epgTitle)
if(httpTool.downloadFile(m["Poster"], posterfile.c_str()))
return 2;
else {
return 1;
if (access(posterfile.c_str(), F_OK) == 0)
unlink(posterfile.c_str());
return 1;
}
}
ret=2;