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
This commit is contained in:
Warren Dukes
2004-05-23 14:12:05 +00:00
parent fbcb995a81
commit 4a541faf12
2 changed files with 29 additions and 11 deletions

View File

@@ -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());