From cde287db9cb3ae5739cb45c5639313ea4847c960 Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 9 Jan 2011 11:08:52 +0100 Subject: Automatically add files in configured folder when archiving movies Added an option to automatically add files in a configurable folder when archiving movies. It's intended for putting cover files in that directory so they don't have to be added manually. --- shemov.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'shemov.cpp') diff --git a/shemov.cpp b/shemov.cpp index fbe4cb9..51a432f 100644 --- a/shemov.cpp +++ b/shemov.cpp @@ -29,6 +29,8 @@ #include #include #include +#include +#include #include @@ -257,6 +259,15 @@ void SheMov::newMovieWizardWithFiles(){ foreach(QModelIndex sel, selected){ mNewMovieWizard->infoPage()->addFile(sel.data(QFileSystemModel::FilePathRole).toString()); } + QSettings s; + bool autoAddCovers = s.value("ui/autoaddcovers", false).toBool(); + QString coverPath = s.value("paths/coverpath").toString(); + if(autoAddCovers && !coverPath.isEmpty()){ + QDir coverDir(coverPath); + foreach(QFileInfo fi, coverDir.entryInfoList(QDir::Files)){ + mNewMovieWizard->infoPage()->addFile(fi.absoluteFilePath()); + } + } mNewMovieWizard->show(); } -- cgit v1.2.3-70-g09d2