diff options
-rw-r--r-- | filestreemodel.cpp | 4 | ||||
-rw-r--r-- | newmoviewizard.cpp | 3 |
2 files changed, 5 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); diff --git a/newmoviewizard.cpp b/newmoviewizard.cpp index 4b8d728..df5c594 100644 --- a/newmoviewizard.cpp +++ b/newmoviewizard.cpp @@ -93,6 +93,9 @@ void NewMovieWizard::accept(){ } ++it; } + if(onDvd){ + filesModel->addFile(tr("DVD"), FilesTreeModel::Movie, quality, partNo, seriesPartId, dvdNo); + } //handle actors MovieMappingPage *actorPage = static_cast<MovieMappingPage*>(page(1)); |