summaryrefslogtreecommitdiffstats
path: root/filestreemodel.h
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2010-11-06 14:12:12 +0100
committerArno <am@disconnect.de>2010-11-06 14:12:12 +0100
commit76bb89940a3818456f535b7d4a8ba6ab9f382631 (patch)
tree0a21a8c7309f8b6b18d6ec4ed5f0fcced7fb374c /filestreemodel.h
parentb62368501e5b37aea3d8d5feac884a254c71380d (diff)
downloadSheMov-76bb89940a3818456f535b7d4a8ba6ab9f382631.tar.gz
SheMov-76bb89940a3818456f535b7d4a8ba6ab9f382631.tar.bz2
SheMov-76bb89940a3818456f535b7d4a8ba6ab9f382631.zip
Bugfix in moveToBurn()
Using the filename from the QModelIndex isn't enough to determine wether the file is a cover or not. A series can have more than one part. So check the real file type and only copy if it's not of type Movie. This fix should obsolete the new ConsistencyChecker :)
Diffstat (limited to 'filestreemodel.h')
-rw-r--r--filestreemodel.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/filestreemodel.h b/filestreemodel.h
index a620312..5140478 100644
--- a/filestreemodel.h
+++ b/filestreemodel.h
@@ -44,6 +44,7 @@ class FilesTreeModel : public SmTreeModel {
QMap<QString, QString> pictureInfo(const QString &path) const;
QMap<QString, QString> pictureInfo(const QModelIndex &idx) const;
QMap<QString, QString> pictureMetaInfo(const QModelIndex &idx);
+ int fileType(const QString &md5sum) const;
//file manipulation
bool addFile(const QString &fullPath, int type, int quality, int filePart, int seriesPartId, int dvd = -1);
@@ -66,6 +67,7 @@ class FilesTreeModel : public SmTreeModel {
QSqlQuery *mInsertFileQuery;
QSqlQuery *mFilesQuery;
QSqlQuery *mDeleteFileQuery;
+ QSqlQuery *mFileTypeQuery;
//misc
QHash<int, QString> mFileTypes;