From 264f3ddbe777c212620a2e5c66c1b9f358f833e7 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Mon, 2 Feb 2015 10:10:49 +0000 Subject: enabled new metadata formatter git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4710 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/fileops/fileops.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/plugins/General/fileops/fileops.cpp') 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)) -- cgit v1.2.3-13-gbd6f