summaryrefslogtreecommitdiffstats
path: root/shemov.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'shemov.cpp')
-rw-r--r--shemov.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/shemov.cpp b/shemov.cpp
index fbe4cb9..51a432f 100644
--- a/shemov.cpp
+++ b/shemov.cpp
@@ -29,6 +29,8 @@
#include <QToolBar>
#include <QIcon>
#include <QHeaderView>
+#include <QDir>
+#include <QFileInfo>
#include <sys/vfs.h>
@@ -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();
}