|
a/upmpd/ohtime.cxx |
|
b/upmpd/ohtime.cxx |
|
... |
|
... |
53 |
string& seconds)
|
53 |
string& seconds)
|
54 |
{
|
54 |
{
|
55 |
// We're relying on AVTransport to have updated the status for us
|
55 |
// We're relying on AVTransport to have updated the status for us
|
56 |
const MpdStatus& mpds = m_dev->getMpdStatusNoUpdate();
|
56 |
const MpdStatus& mpds = m_dev->getMpdStatusNoUpdate();
|
57 |
|
57 |
|
58 |
trackcount = SoapArgs::i2s(mpds.trackcounter);
|
58 |
trackcount = SoapHelp::i2s(mpds.trackcounter);
|
59 |
|
59 |
|
60 |
bool is_song = (mpds.state == MpdStatus::MPDS_PLAY) ||
|
60 |
bool is_song = (mpds.state == MpdStatus::MPDS_PLAY) ||
|
61 |
(mpds.state == MpdStatus::MPDS_PAUSE);
|
61 |
(mpds.state == MpdStatus::MPDS_PAUSE);
|
62 |
if (is_song) {
|
62 |
if (is_song) {
|
63 |
duration = SoapArgs::i2s(mpds.songlenms / 1000);
|
63 |
duration = SoapHelp::i2s(mpds.songlenms / 1000);
|
64 |
seconds = SoapArgs::i2s(mpds.songelapsedms / 1000);
|
64 |
seconds = SoapHelp::i2s(mpds.songelapsedms / 1000);
|
65 |
} else {
|
65 |
} else {
|
66 |
duration = "0";
|
66 |
duration = "0";
|
67 |
seconds = "0";
|
67 |
seconds = "0";
|
68 |
}
|
68 |
}
|
69 |
}
|
69 |
}
|