|
a/upmpd/ohinfo.cxx |
|
b/upmpd/ohinfo.cxx |
|
... |
|
... |
56 |
bind(&OHInfo::metatext, this, _1, _2));
|
56 |
bind(&OHInfo::metatext, this, _1, _2));
|
57 |
}
|
57 |
}
|
58 |
|
58 |
|
59 |
void OHInfo::urimetadata(string& uri, string& metadata)
|
59 |
void OHInfo::urimetadata(string& uri, string& metadata)
|
60 |
{
|
60 |
{
|
61 |
const MpdStatus &mpds = m_dev->getMpdStatus();
|
61 |
const MpdStatus &mpds = m_dev->getMpdStatusNoUpdate();
|
62 |
bool is_song = (mpds.state == MpdStatus::MPDS_PLAY) ||
|
62 |
bool is_song = (mpds.state == MpdStatus::MPDS_PLAY) ||
|
63 |
(mpds.state == MpdStatus::MPDS_PAUSE);
|
63 |
(mpds.state == MpdStatus::MPDS_PAUSE);
|
64 |
|
64 |
|
65 |
if (is_song) {
|
65 |
if (is_song) {
|
66 |
uri = mpds.currentsong.uri;
|
66 |
uri = mpds.currentsong.uri;
|
|
... |
|
... |
72 |
}
|
72 |
}
|
73 |
|
73 |
|
74 |
void OHInfo::makedetails(string &duration, string& bitrate,
|
74 |
void OHInfo::makedetails(string &duration, string& bitrate,
|
75 |
string& bitdepth, string& samplerate)
|
75 |
string& bitdepth, string& samplerate)
|
76 |
{
|
76 |
{
|
77 |
const MpdStatus &mpds = m_dev->getMpdStatus();
|
77 |
const MpdStatus &mpds = m_dev->getMpdStatusNoUpdate();
|
78 |
|
78 |
|
79 |
bool is_song = (mpds.state == MpdStatus::MPDS_PLAY) ||
|
79 |
bool is_song = (mpds.state == MpdStatus::MPDS_PLAY) ||
|
80 |
(mpds.state == MpdStatus::MPDS_PAUSE);
|
80 |
(mpds.state == MpdStatus::MPDS_PAUSE);
|
81 |
|
81 |
|
82 |
if (is_song) {
|
82 |
if (is_song) {
|