From a2dfe9d2fcc3d4cdb68db3e1726996fc00151690 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Mon, 29 Jun 2009 13:28:17 +0000 Subject: some fileops plugin improvements git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@985 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/fileops/fileops.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 a25d617aa..55fd0bdf3 100644 --- a/src/plugins/General/fileops/fileops.cpp +++ b/src/plugins/General/fileops/fileops.cpp @@ -193,21 +193,21 @@ QString FileOps::generateFileName(PlayListItem *item, QString pattern) fname = printTag(fname, "%p", item->artist(), pattern); fname = printTag(fname, "%a", item->album(), pattern); fname = printTag(fname, "%t", item->title(), pattern); - fname = printTag(fname, "%n", QString("%1").arg(item->track()), pattern); + if(item->track().size() > 1) + fname = printTag(fname, "%n", item->track(), pattern); + else + fname = printTag(fname, "%n", QString("0") + item->track(), pattern); fname = printTag(fname, "%g", item->genre(), pattern); fname = printTag(fname, "%f", item->url().section('/',-1), pattern); fname = printTag(fname, "%y", QString("%1").arg(item->year ()), pattern); - //fname.replace(" ", "_"); if (fname.isEmpty()) { if (item->url().contains('/')) fname = item->url().split('/',QString::SkipEmptyParts).takeLast (); } return fname; - } - QString FileOps::printTag(QString str, QString regExp, QString tagStr, QString fmt) { QString format = fmt; -- cgit v1.2.3-13-gbd6f