summaryrefslogtreecommitdiffstats
path: root/filestreewidget.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2010-11-06 14:12:12 +0100
committerArno <am@disconnect.de>2010-11-06 14:12:12 +0100
commit76bb89940a3818456f535b7d4a8ba6ab9f382631 (patch)
tree0a21a8c7309f8b6b18d6ec4ed5f0fcced7fb374c /filestreewidget.cpp
parentb62368501e5b37aea3d8d5feac884a254c71380d (diff)
downloadSheMov-76bb89940a3818456f535b7d4a8ba6ab9f382631.tar.gz
SheMov-76bb89940a3818456f535b7d4a8ba6ab9f382631.tar.bz2
SheMov-76bb89940a3818456f535b7d4a8ba6ab9f382631.zip
Bugfix in moveToBurn()
Using the filename from the QModelIndex isn't enough to determine wether the file is a cover or not. A series can have more than one part. So check the real file type and only copy if it's not of type Movie. This fix should obsolete the new ConsistencyChecker :)
Diffstat (limited to 'filestreewidget.cpp')
-rw-r--r--filestreewidget.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/filestreewidget.cpp b/filestreewidget.cpp
index 7fbc0fc..b017d7d 100644
--- a/filestreewidget.cpp
+++ b/filestreewidget.cpp
@@ -90,7 +90,11 @@ void FilesTreeWidget::moveToBurn(){
foreach(QString name, files.keys()){
QString sourceFile = Helper::createArchivePath(name, files.value(name));
QString targetFile = QString("%1/%2/%3").arg(burnDir).arg(dirName).arg(name);
- if(name == i.data(FilesTreeModel::FileNameRole).toString()){
+ int fileType = mModel->fileType(files.value(name));
+ if(fileType == -1){
+ continue;
+ }
+ if(fileType == FilesTreeModel::Movie){
QFile::rename(sourceFile, targetFile);
}else{
QFile::copy(sourceFile, targetFile);