aboutsummaryrefslogtreecommitdiffstats
path: root/src/command.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-05-23 14:12:05 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-05-23 14:12:05 +0000
commit4a541faf121bdad6951540c9c0c9d055d4b73ee6 (patch)
treef7b0c5c3ba8cc92ed8af1349bd30f919b7178448 /src/command.c
parentfbcb995a81e378db8afa41034949429af953006b (diff)
downloadmpd-4a541faf121bdad6951540c9c0c9d055d4b73ee6.tar.gz
mpd-4a541faf121bdad6951540c9c0c9d055d4b73ee6.tar.xz
mpd-4a541faf121bdad6951540c9c0c9d055d4b73ee6.zip
by popular demand: have stop remember the current song and play will start
playing from the stopped song. git-svn-id: https://svn.musicpd.org/mpd/trunk@1139 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/command.c')
-rw-r--r--src/command.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/command.c b/src/command.c
index bf77dc8e7..09f869ee0 100644
--- a/src/command.c
+++ b/src/command.c
@@ -178,6 +178,7 @@ int commandStatus(FILE * fp, unsigned int * permission, int argArrayLength,
{
char * state = NULL;
int updateJobId;
+ int song;
playPlaylistIfPlayerStopped();
switch(getPlayerState()) {
@@ -202,8 +203,9 @@ int commandStatus(FILE * fp, unsigned int * permission, int argArrayLength,
myfprintf(fp,"%s: %s\n",COMMAND_STATUS_STATE,state);
+ song = getPlaylistCurrentSong();
+ if(song >= 0) myfprintf(fp,"%s: %i\n",COMMAND_STATUS_SONG,song);
if(getPlayerState()!=PLAYER_STATE_STOP) {
- myfprintf(fp,"%s: %i\n",COMMAND_STATUS_SONG,getPlaylistCurrentSong());
myfprintf(fp,"%s: %i:%i\n",COMMAND_STATUS_TIME,getPlayerElapsedTime(),getPlayerTotalTime());
myfprintf(fp,"%s: %li\n",COMMAND_STATUS_BITRATE,getPlayerBitRate(),getPlayerTotalTime());
myfprintf(fp,"%s: %u:%i:%i\n",COMMAND_STATUS_AUDIO,getPlayerSampleRate(),getPlayerBits(),getPlayerChannels());