summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--newmoviewizard.cpp35
1 files changed, 16 insertions, 19 deletions
diff --git a/newmoviewizard.cpp b/newmoviewizard.cpp
index 2500e78..c174e20 100644
--- a/newmoviewizard.cpp
+++ b/newmoviewizard.cpp
@@ -257,25 +257,22 @@ void NewMovieWizard::accept(){
}
//genres done!
//now handle metadata
- bool isEnabled = field("enabled").toBool();
- if(isEnabled){
- 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)");
- MovieMetadataPage *metadataPage = qobject_cast<MovieMetadataPage*>(page(3));
- QList<QVariant> metadata = metadataPage->widget()->metadata();
- insertMetadataQ.bindValue(":pid", seriesPartId);
- insertMetadataQ.bindValue(":rely", metadata.at(ArchiveModel::ReleaseYear));
- insertMetadataQ.bindValue(":source", metadata.at(ArchiveModel::Source));
- insertMetadataQ.bindValue(":sub", metadata.at(ArchiveModel::Subject));
- insertMetadataQ.bindValue(":group", metadata.at(ArchiveModel::ReleaseGroup));
- 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;
- }
+ 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)");
+ MovieMetadataPage *metadataPage = qobject_cast<MovieMetadataPage*>(page(3));
+ QList<QVariant> metadata = metadataPage->widget()->metadata();
+ insertMetadataQ.bindValue(":pid", seriesPartId);
+ insertMetadataQ.bindValue(":rely", metadata.at(ArchiveModel::ReleaseYear));
+ insertMetadataQ.bindValue(":source", metadata.at(ArchiveModel::Source));
+ insertMetadataQ.bindValue(":sub", metadata.at(ArchiveModel::Subject));
+ insertMetadataQ.bindValue(":group", metadata.at(ArchiveModel::ReleaseGroup));
+ 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;
}
//we're still here, good
//now actually move the files