get total time from mpd status, not from currently playing track

it seems that even if track info doesn't provide total track length,
mpd status does, which allows for seeking and displaying progressbar.
This commit is contained in:
Andrzej Rybczak
2009-09-09 18:32:57 +02:00
parent 6cc4eac00e
commit 30b8622776
3 changed files with 35 additions and 35 deletions

View File

@@ -129,6 +129,7 @@ namespace MPD
long long GetPlaylistID() const { return isConnected && itsCurrentStatus ? itsCurrentStatus->playlist : -1; }
long long GetOldPlaylistID() const { return isConnected && itsOldStatus ? itsOldStatus->playlist : -1; }
int GetElapsedTime() const { return isConnected && itsCurrentStatus ? itsCurrentStatus->elapsedTime : -1; }
int GetTotalTime() const { return isConnected && itsCurrentStatus ? itsCurrentStatus->totalTime : 0; }
unsigned GetBitrate() const { return isConnected && itsCurrentStatus ? itsCurrentStatus->bitRate : 0; }
size_t GetMaxPlaylistLength() const { return itsMaxPlaylistLength; }