summaryrefslogtreecommitdiffstats
path: root/filestreemodel.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2010-07-29 20:41:07 +0200
committerArno <am@disconnect.de>2010-07-29 20:41:07 +0200
commit5926a52a30428a2fa10ff8f367e4cb4355f62c2d (patch)
tree2c82ef867ce0e9863658107e9d405f823a7a50d5 /filestreemodel.cpp
parentd27a1ac45fddeeb4a0bc1220f3858534f5aeca37 (diff)
downloadSheMov-5926a52a30428a2fa10ff8f367e4cb4355f62c2d.tar.gz
SheMov-5926a52a30428a2fa10ff8f367e4cb4355f62c2d.tar.bz2
SheMov-5926a52a30428a2fa10ff8f367e4cb4355f62c2d.zip
Don't add quality to covers
Fix adding quality to cover files in database by binding a NULL value when type != Movie in FilesTreeModel. While fixing this I discovered a typo in the database schema. The sequence for genres was named genres_igrenres_id__seq. Removed the superfluous 'r' in the name and fixed migdb.py on the way. Now SheMov doesn't crash any more when adding a new series part, but the new item still doesn't get selected...
Diffstat (limited to 'filestreemodel.cpp')
-rw-r--r--filestreemodel.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/filestreemodel.cpp b/filestreemodel.cpp
index b02c8ac..1f224fd 100644
--- a/filestreemodel.cpp
+++ b/filestreemodel.cpp
@@ -254,7 +254,11 @@ bool FilesTreeModel::addFile(const QString &fullPath, int type, int quality, int
mInsertFileQuery->bindValue(":dvd", dvd);
mInsertFileQuery->bindValue(":type", type);
mInsertFileQuery->bindValue(":fileno", filePart);
- mInsertFileQuery->bindValue(":quality", quality);
+ if(type == Movie){
+ mInsertFileQuery->bindValue(":quality", quality);
+ }else{
+ mInsertFileQuery->bindValue(":quality", QVariant(QVariant::Int));
+ }
//insert item
if(mInsertFileQuery->exec()){