Switch to unified view

a/upmpd/avtransport.cxx b/upmpd/avtransport.cxx
...
...
267
        if (!it->second.compare(oldvalue))
267
        if (!it->second.compare(oldvalue))
268
            continue;
268
            continue;
269
269
270
        if (it->first.compare("RelativeTimePosition") && 
270
        if (it->first.compare("RelativeTimePosition") && 
271
            it->first.compare("AbsoluteTimePosition")) {
271
            it->first.compare("AbsoluteTimePosition")) {
272
            //DEBOUT << "Transport state update for " << it->first << 
272
            //LOGDEB("AVTransport: state update for " << it->first << 
273
            // " oldvalue [" << oldvalue << "] -> [" << it->second << endl;
273
            // " oldvalue [" << oldvalue << "] -> [" << it->second << endl);
274
            changefound = true;
274
            changefound = true;
275
        }
275
        }
276
276
277
        chgdata += "<";
277
        chgdata += "<";
278
        chgdata += it->first;
278
        chgdata += it->first;
...
...
281
        chgdata += "\"/>\n";
281
        chgdata += "\"/>\n";
282
    }
282
    }
283
    chgdata += "</InstanceID>\n</Event>\n";
283
    chgdata += "</InstanceID>\n</Event>\n";
284
284
285
    if (!changefound) {
285
    if (!changefound) {
286
        // DEBOUT << "UpMpdAVTransport::getEventDataTransport: no updates" << endl;
286
        LOGDEB1("UpMpdAVTransport::getEventDataTransport: no updates" << endl);
287
        return true;
287
        return true;
288
    }
288
    }
289
289
290
    names.push_back("LastChange");
290
    names.push_back("LastChange");
291
    values.push_back(chgdata);
291
    values.push_back(chgdata);
292
292
293
    m_tpstate = newtpstate;
293
    m_tpstate = newtpstate;
294
    // DEBOUT << "UpMpdAVTransport::getEventDataTransport: " << chgdata << endl;
294
    LOGDEB1("UpMpdAVTransport::getEventDataTransport: " << chgdata << endl);
295
    return true;
295
    return true;
296
}
296
}
297
297
298
// http://192.168.4.4:8200/MediaItems/246.mp3
298
// http://192.168.4.4:8200/MediaItems/246.mp3
299
int UpMpdAVTransport::setAVTransportURI(const SoapArgs& sc, SoapData& data, 
299
int UpMpdAVTransport::setAVTransportURI(const SoapArgs& sc, SoapData& data, 
...
...
343
    int songid;
343
    int songid;
344
    if ((songid = m_dev->m_mpdcli->insert(uri, setnext?curpos+1:curpos)) < 0) {
344
    if ((songid = m_dev->m_mpdcli->insert(uri, setnext?curpos+1:curpos)) < 0) {
345
        return UPNP_E_INTERNAL_ERROR;
345
        return UPNP_E_INTERNAL_ERROR;
346
    }
346
    }
347
347
348
    metadata = regsub1("<\\?xml.*\\?>", metadata, "");
349
    if (setnext) {
348
    if (setnext) {
350
        m_nextUri = uri;
349
        m_nextUri = uri;
351
        m_nextMetadata = metadata;
350
        m_nextMetadata = metadata;
352
    } else {
351
    } else {
353
        m_uri = uri;
352
        m_uri = uri;
354
        m_curMetadata = metadata;
353
        m_curMetadata = metadata;
355
        m_nextUri = "";
356
        m_nextMetadata = "";
357
    }
354
    }
358
355
359
    if (!setnext) {
356
    if (!setnext) {
360
        MpdStatus::State st = mpds.state;
357
        MpdStatus::State st = mpds.state;
361
        // Have to tell mpd which track to play, else it will keep on
358
        // Have to tell mpd which track to play, else it will keep on