aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/fileops/fileops.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2015-02-02 10:10:49 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2015-02-02 10:10:49 +0000
commit264f3ddbe777c212620a2e5c66c1b9f358f833e7 (patch)
tree6db54ed8111453e687c6ce8569cadf37df2f8c27 /src/plugins/General/fileops/fileops.cpp
parent8eccc97170a4ea592aa3fe38fed1294e86df0b1c (diff)
downloadqmmp-264f3ddbe777c212620a2e5c66c1b9f358f833e7.tar.gz
qmmp-264f3ddbe777c212620a2e5c66c1b9f358f833e7.tar.bz2
qmmp-264f3ddbe777c212620a2e5c66c1b9f358f833e7.zip
enabled new metadata formatter
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4710 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/fileops/fileops.cpp')
-rw-r--r--src/plugins/General/fileops/fileops.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/General/fileops/fileops.cpp b/src/plugins/General/fileops/fileops.cpp
index 6e41178b7..e7c2d49f7 100644
--- a/src/plugins/General/fileops/fileops.cpp
+++ b/src/plugins/General/fileops/fileops.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2009-2012 by Ilya Kotov *
+ * Copyright (C) 2009-2015 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -82,6 +82,7 @@ void FileOps::execAction(int n)
{
int type = m_types.at(n);
QString pattern = m_patterns.at(n);
+ MetaDataFormatter formatter(pattern);
QString destination = m_destinations.at(n);
PlayListModel *model = MediaPlayer::instance()->playListManager()->selectedPlayList();
@@ -110,8 +111,7 @@ void FileOps::execAction(int n)
if (!QFile::exists(item->url()))
continue;
//generate file name
- MetaDataFormatter formatter(pattern);
- QString fname = formatter.parse(item);
+ QString fname = formatter.format(item);
//append extension
QString ext = QString(".") + item->url().split('.',QString::SkipEmptyParts).takeLast ();
if (!fname.endsWith(ext))
@@ -163,8 +163,7 @@ void FileOps::execAction(int n)
if (!QFile::exists(item->url()))
continue;
//generate file name
- MetaDataFormatter formatter(pattern);
- QString fname = formatter.parse(item);
+ QString fname = formatter.format(item);
//append extension
QString ext = QString(".") + item->url().split('.',QString::SkipEmptyParts).takeLast ();
if (!fname.endsWith(ext))