|
a/src/ohplaylist.cxx |
|
b/src/ohplaylist.cxx |
|
... |
|
... |
604 |
{
|
604 |
{
|
605 |
LOGDEB("OHPlaylist::deleteId" << endl);
|
605 |
LOGDEB("OHPlaylist::deleteId" << endl);
|
606 |
int id;
|
606 |
int id;
|
607 |
bool ok = sc.getInt("Value", &id);
|
607 |
bool ok = sc.getInt("Value", &id);
|
608 |
if (ok) {
|
608 |
if (ok) {
|
|
|
609 |
const MpdStatus &mpds = m_dev->getMpdStatusNoUpdate();
|
|
|
610 |
if (mpds.songid == id) {
|
|
|
611 |
// MPD skips to the next track if the current one is removed,
|
|
|
612 |
// but I think it's better to stop in this case
|
|
|
613 |
m_dev->m_mpdcli->stop();
|
|
|
614 |
}
|
609 |
ok = m_dev->m_mpdcli->deleteId(id);
|
615 |
ok = m_dev->m_mpdcli->deleteId(id);
|
610 |
m_mpdqvers = -1;
|
616 |
m_mpdqvers = -1;
|
611 |
maybeWakeUp(ok);
|
617 |
maybeWakeUp(ok);
|
612 |
}
|
618 |
}
|
613 |
return ok ? UPNP_E_SUCCESS : UPNP_E_INTERNAL_ERROR;
|
619 |
return ok ? UPNP_E_SUCCESS : UPNP_E_INTERNAL_ERROR;
|