summaryrefslogtreecommitdiffstats
path: root/newmoviewizard.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2014-12-10 07:40:41 +0100
committerArno <am@disconnect.de>2014-12-10 07:40:41 +0100
commit012be0e75bf24ed49294e2d54ae941d383b48df5 (patch)
tree6e421cf3cbf3acca7964dcb8ea8191400f376adb /newmoviewizard.cpp
parent175d243e0c0021e9f303474aa3088045a516a62c (diff)
downloadSheMov-012be0e75bf24ed49294e2d54ae941d383b48df5.tar.gz
SheMov-012be0e75bf24ed49294e2d54ae941d383b48df5.tar.bz2
SheMov-012be0e75bf24ed49294e2d54ae941d383b48df5.zip
Let database handle dadded
Add a default value in db schema instead of doing it in the logic.
Diffstat (limited to 'newmoviewizard.cpp')
-rw-r--r--newmoviewizard.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/newmoviewizard.cpp b/newmoviewizard.cpp
index f6f5cc0..1c84f5f 100644
--- a/newmoviewizard.cpp
+++ b/newmoviewizard.cpp
@@ -257,7 +257,7 @@ void NewMovieWizard::accept(){
//genres done!
//now handle metadata
QSqlQuery insertMetadataQ(db);
- insertMetadataQ.prepare("INSERT INTO metadata (iseriespart_id, sireleaseyear, tsourcemedium, tsubject, treleasegroup, tencoderopts, tcomment, sipasses, dadded) VALUES(:pid, :rely, :source, :sub, :group, :encopts, :comment, :passes, :added)");
+ insertMetadataQ.prepare("INSERT INTO metadata (iseriespart_id, sireleaseyear, tsourcemedium, tsubject, treleasegroup, tencoderopts, tcomment, sipasses) VALUES(:pid, :rely, :source, :sub, :group, :encopts, :comment, :passes)");
MovieMetadataPage *metadataPage = qobject_cast<MovieMetadataPage*>(page(3));
QList<QVariant> metadata = metadataPage->widget()->metadata();
insertMetadataQ.bindValue(":pid", seriesPartId);
@@ -268,7 +268,6 @@ void NewMovieWizard::accept(){
insertMetadataQ.bindValue(":encopts", metadata.at(ArchiveModel::EncoderOpts));
insertMetadataQ.bindValue(":comment", metadata.at(ArchiveModel::Comment));
insertMetadataQ.bindValue(":passes", metadata.at(ArchiveModel::Passes));
- insertMetadataQ.bindValue(":added", QDate::currentDate());
if(!insertMetadataQ.exec()){
db.rollback();
return;