|
a/src/ohplaylist.cxx |
|
b/src/ohplaylist.cxx |
|
... |
|
... |
484 |
|
484 |
|
485 |
// Return current Id
|
485 |
// Return current Id
|
486 |
int OHPlaylist::id(const SoapIncoming& sc, SoapOutgoing& data)
|
486 |
int OHPlaylist::id(const SoapIncoming& sc, SoapOutgoing& data)
|
487 |
{
|
487 |
{
|
488 |
LOGDEB("OHPlaylist::id" << endl);
|
488 |
LOGDEB("OHPlaylist::id" << endl);
|
489 |
if (!m_active && m_dev->m_ohpr) {
|
489 |
if (!m_active) {
|
490 |
m_dev->m_ohpr->iSetSourceIndexByName("Playlist");
|
490 |
LOGERR("OHPlaylist::id: not active" << endl);
|
|
|
491 |
return UPNP_E_INTERNAL_ERROR;
|
491 |
}
|
492 |
}
|
|
|
493 |
|
492 |
const MpdStatus &mpds = m_dev->getMpdStatusNoUpdate();
|
494 |
const MpdStatus &mpds = m_dev->getMpdStatusNoUpdate();
|
493 |
data.addarg("Value", mpds.songid == -1 ? "0" : SoapHelp::i2s(mpds.songid));
|
495 |
data.addarg("Value", mpds.songid == -1 ? "0" : SoapHelp::i2s(mpds.songid));
|
494 |
return UPNP_E_SUCCESS;
|
496 |
return UPNP_E_SUCCESS;
|
495 |
}
|
497 |
}
|
496 |
|
498 |
|
|
... |
|
... |
734 |
// Returns current list of id as array of big endian 32bits integers,
|
736 |
// Returns current list of id as array of big endian 32bits integers,
|
735 |
// base-64-encoded.
|
737 |
// base-64-encoded.
|
736 |
int OHPlaylist::idArray(const SoapIncoming& sc, SoapOutgoing& data)
|
738 |
int OHPlaylist::idArray(const SoapIncoming& sc, SoapOutgoing& data)
|
737 |
{
|
739 |
{
|
738 |
LOGDEB("OHPlaylist::idArray" << endl);
|
740 |
LOGDEB("OHPlaylist::idArray" << endl);
|
739 |
if (!m_active && m_dev->m_ohpr) {
|
741 |
if (!m_active) {
|
740 |
m_dev->m_ohpr->iSetSourceIndexByName("Playlist");
|
742 |
// See comment in seekId()
|
|
|
743 |
LOGERR("OHPlaylist::idArray: not active" << endl);
|
|
|
744 |
return UPNP_E_INTERNAL_ERROR;
|
741 |
}
|
745 |
}
|
742 |
string idarray;
|
746 |
string idarray;
|
743 |
int token;
|
747 |
int token;
|
744 |
if (iidArray(idarray, &token)) {
|
748 |
if (iidArray(idarray, &token)) {
|
745 |
data.addarg("Token", SoapHelp::i2s(token));
|
749 |
data.addarg("Token", SoapHelp::i2s(token));
|