|
a/src/ohplaylist.cxx |
|
b/src/ohplaylist.cxx |
|
... |
|
... |
652 |
const string& metadata, int *newid)
|
652 |
const string& metadata, int *newid)
|
653 |
{
|
653 |
{
|
654 |
LOGDEB1("OHPlaylist::insertUri: " << uri << endl);
|
654 |
LOGDEB1("OHPlaylist::insertUri: " << uri << endl);
|
655 |
if (!m_active) {
|
655 |
if (!m_active) {
|
656 |
LOGERR("OHPlaylist::insertUri: not active" << endl);
|
656 |
LOGERR("OHPlaylist::insertUri: not active" << endl);
|
657 |
return UPNP_E_INTERNAL_ERROR;
|
657 |
return false;
|
658 |
}
|
658 |
}
|
|
|
659 |
|
659 |
UpSong metaformpd;
|
660 |
UpSong metaformpd;
|
660 |
if (!uMetaToUpSong(metadata, &metaformpd)) {
|
661 |
if (!m_dev->checkContentFormat(uri, metadata, &metaformpd)) {
|
661 |
LOGERR("OHPlaylist::insert: failed to parse metadata " << " Uri ["
|
662 |
LOGERR("OHPlaylist::insertUri: unsupported format: uri " << uri <<
|
662 |
<< uri << "] Metadata [" << metadata << "]" << endl);
|
663 |
" metadata " << metadata);
|
663 |
return false;
|
664 |
return false;
|
664 |
}
|
665 |
}
|
665 |
int id = m_dev->m_mpdcli->insertAfterId(uri, afterid, metaformpd);
|
666 |
int id = m_dev->m_mpdcli->insertAfterId(uri, afterid, metaformpd);
|
666 |
if (id != -1) {
|
667 |
if (id != -1) {
|
667 |
m_metacache[uri] = metadata;
|
668 |
m_metacache[uri] = metadata;
|