Fixes wrong fileref

This commit is contained in:
Christian
2016-05-23 21:22:19 +02:00
parent b9ea9f5a1d
commit c762aaa40b

9
tvsp.c
View File

@@ -195,14 +195,14 @@ int Tvsp::processDay(int day, int fullupdate, Statistic *stat) {
if (saveXml) {
SaveFile(xmlData, filename.str() + ".xml");
}
std::stringstream fileRef;
fileRef << extid << "-" << date << "-" << eTag;
if (processXml(xmlData, extid, filename.str()) != success) {
if (processXml(xmlData, extid, fileRef.str()) != success) {
stat->rejected++;
}
else {
std::stringstream fileRef;
fileRef << extid << "-" << date << "-" << eTag;
obj->fileDb->clear();
obj->fileDb->setValue("Name", filename.str().c_str());
obj->fileDb->setValue("Source", getSource());
@@ -229,6 +229,7 @@ int Tvsp::processDay(int day, int fullupdate, Statistic *stat) {
}
}
obj->connection->commit();
downloadImages();
return success;