diff options
author | Arno <am@disconnect.de> | 2011-01-09 11:08:52 +0100 |
---|---|---|
committer | Arno <am@disconnect.de> | 2011-01-09 11:08:52 +0100 |
commit | cde287db9cb3ae5739cb45c5639313ea4847c960 (patch) | |
tree | 04cf6a5ed5a1682745fa16b8fa1e4d0cf946d24b /shemov.cpp | |
parent | 70ad086ccaf69cf4592db90a641daf0a23ab1428 (diff) | |
download | SheMov-cde287db9cb3ae5739cb45c5639313ea4847c960.tar.gz SheMov-cde287db9cb3ae5739cb45c5639313ea4847c960.tar.bz2 SheMov-cde287db9cb3ae5739cb45c5639313ea4847c960.zip |
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.
Diffstat (limited to 'shemov.cpp')
-rw-r--r-- | shemov.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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(); } |