summaryrefslogtreecommitdiffstats
path: root/filestreemodel.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2010-08-06 13:15:58 +0200
committerArno <am@disconnect.de>2010-08-06 13:15:58 +0200
commitcc79c6f282877d7772bd3429fef797f5a4848c3f (patch)
tree79dd8d5528abe016f2e0c39601ecda23fdd92584 /filestreemodel.cpp
parent9e12957c363a68543456dfe95ab88a11a69ae610 (diff)
downloadSheMov-cc79c6f282877d7772bd3429fef797f5a4848c3f.tar.gz
SheMov-cc79c6f282877d7772bd3429fef797f5a4848c3f.tar.bz2
SheMov-cc79c6f282877d7772bd3429fef797f5a4848c3f.zip
Bugfix when adding files on DVD
Insert a dummy file into the database when adding files already archived.
Diffstat (limited to 'filestreemodel.cpp')
-rw-r--r--filestreemodel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/filestreemodel.cpp b/filestreemodel.cpp
index 9c17084..67c7c82 100644
--- a/filestreemodel.cpp
+++ b/filestreemodel.cpp
@@ -314,13 +314,13 @@ QMap<QString, QString> FilesTreeModel::pictureMetaInfo(const QModelIndex &idx){
bool FilesTreeModel::addFile(const QString &fullPath, int type, int quality, int filePart, int seriesPartId, int dvd){
QFileInfo fi(fullPath);
qint64 size = fi.size();
+ QString md5Sum = Helper::md5Sum(fullPath);
if(!fi.exists()){
//should be a dvd
size = Q_INT64_C(4707319808);
+ md5Sum = QString(32, '0');
}
- QString md5Sum = Helper::md5Sum(fullPath);
-
//prepare query
mDb.transaction();
mInsertFileQuery->bindValue(":seriespartid", seriesPartId);