aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2014-10-18 07:50:54 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2014-10-18 07:50:54 +0000
commit8ec16545513c4bccb0ff116a1105b55499de8356 (patch)
tree7c6f5800a78056aa7cdafceedf6724684ff31bb4
parent18193084224f53298a44b53e48358f3a095ee1d6 (diff)
downloadqmmp-8ec16545513c4bccb0ff116a1105b55499de8356.tar.gz
qmmp-8ec16545513c4bccb0ff116a1105b55499de8356.tar.bz2
qmmp-8ec16545513c4bccb0ff116a1105b55499de8356.zip
updated status plugin
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4584 90c681e8-e032-0410-971d-27865f9a5e38
-rw-r--r--src/plugins/CommandLineOptions/PlayListOption/playlistoption.cpp17
-rw-r--r--src/plugins/CommandLineOptions/StatusOption/statusoption.cpp5
2 files changed, 5 insertions, 17 deletions
diff --git a/src/plugins/CommandLineOptions/PlayListOption/playlistoption.cpp b/src/plugins/CommandLineOptions/PlayListOption/playlistoption.cpp
index bae382f37..4082fde1c 100644
--- a/src/plugins/CommandLineOptions/PlayListOption/playlistoption.cpp
+++ b/src/plugins/CommandLineOptions/PlayListOption/playlistoption.cpp
@@ -100,25 +100,12 @@ QString PlayListOption::executeCommand(const QString& opt_str, const QStringList
return tr("Invalid number of arguments") + "\n";
int pl_id = (args.count() == 1) ? pl_manager->currentPlayListIndex() : args.at(0).toInt() - 1;
- int track_id = (args.count() == 1) ? args.at(0).toInt() - 1 : args.at(1).toInt() - 1;
+ int track_number = (args.count() == 1) ? args.at(0).toInt() - 1 : args.at(1).toInt() - 1;
PlayListModel *model = pl_manager->playListAt(pl_id);
if(!model)
return tr("Invalid playlist ID") + "\n";
- PlayListTrack *track = 0;
- int track_counter = 0;
- for(int i = 0; i < model->count(); i++)
- {
- if(model->isTrack(i))
- track_counter++;
- else
- continue;
- if(track_counter - 1 == track_id)
- {
- track = model->track(i);
- break;
- }
- }
+ PlayListTrack *track = model->findTrack(track_number);
if(!track)
return tr("Invalid track ID") + "\n";
player->stop();
diff --git a/src/plugins/CommandLineOptions/StatusOption/statusoption.cpp b/src/plugins/CommandLineOptions/StatusOption/statusoption.cpp
index dc9ebc4b1..4fe1dcbcf 100644
--- a/src/plugins/CommandLineOptions/StatusOption/statusoption.cpp
+++ b/src/plugins/CommandLineOptions/StatusOption/statusoption.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2010 by Ilya Kotov *
+ * Copyright (C) 2010-2014 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -63,7 +63,7 @@ QString StatusOption::executeCommand(const QString &opt_str, const QStringList &
out += " ";
out += genProgressBar() + "\n";
out += "ARTIST = %p\n";
- out += "ALBUMARTIST = %p\n";
+ out += "ALBUMARTIST = %aa\n";
out += "TITLE = %t\n";
out += "ALBUM = %a\n";
out += "COMMENT = %c\n";
@@ -89,6 +89,7 @@ QString StatusOption::executeCommand(const QString &opt_str, const QStringList &
out += tr("Syntax:") + "\n";
out += tr("%p - artist") + "\n";
out += tr("%a - album") + "\n";
+ out += tr("%aa - album artist") + "\n";
out += tr("%t - title") + "\n";
out += tr("%n - track") + "\n";
out += tr("%NN - 2-digit track") + "\n";