Switch to unified view

a/upmpd/upmpdutils.cxx b/upmpd/upmpdutils.cxx
...
...
358
        "xmlns=\"urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/\" "
358
        "xmlns=\"urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/\" "
359
        "xmlns:dlna=\"urn:schemas-dlna-org:metadata-1-0/\">"
359
        "xmlns:dlna=\"urn:schemas-dlna-org:metadata-1-0/\">"
360
       << "<item restricted=\"1\">";
360
       << "<item restricted=\"1\">";
361
361
362
    {   const string& val = song.title;
362
    {   const string& val = song.title;
363
        ss << "<dc:title>" << SoapArgs::xmlQuote(val) << "</dc:title>";
363
        ss << "<dc:title>" << SoapHelp::xmlQuote(val) << "</dc:title>";
364
    }
364
    }
365
    
365
    
366
    // TBD Playlists etc?
366
    // TBD Playlists etc?
367
    ss << "<upnp:class>object.item.audioItem.musicTrack</upnp:class>";
367
    ss << "<upnp:class>object.item.audioItem.musicTrack</upnp:class>";
368
368
369
    {   const string& val = song.artist;
369
    {   const string& val = song.artist;
370
        if (!val.empty()) {
370
        if (!val.empty()) {
371
            string a = SoapArgs::xmlQuote(val);
371
            string a = SoapHelp::xmlQuote(val);
372
            ss << "<dc:creator>" << a << "</dc:creator>" << 
372
            ss << "<dc:creator>" << a << "</dc:creator>" << 
373
                "<upnp:artist>" << a << "</upnp:artist>";
373
                "<upnp:artist>" << a << "</upnp:artist>";
374
        }
374
        }
375
    }
375
    }
376
376
377
    {   const string& val = song.album;
377
    {   const string& val = song.album;
378
        if (!val.empty()) {
378
        if (!val.empty()) {
379
            ss << "<upnp:album>" << SoapArgs::xmlQuote(val) << "</upnp:album>";
379
            ss << "<upnp:album>" << SoapHelp::xmlQuote(val) << "</upnp:album>";
380
        }
380
        }
381
    }
381
    }
382
382
383
    {   const string& val = song.genre;
383
    {   const string& val = song.genre;
384
        if (!val.empty()) {
384
        if (!val.empty()) {
385
            ss << "<upnp:genre>" << SoapArgs::xmlQuote(val) << "</upnp:genre>";
385
            ss << "<upnp:genre>" << SoapHelp::xmlQuote(val) << "</upnp:genre>";
386
        }
386
        }
387
    }
387
    }
388
388
389
    {const string& val = song.tracknum;
389
    {const string& val = song.tracknum;
390
        if (!val.empty()) {
390
        if (!val.empty()) {
...
...
404
    // it out for now.
404
    // it out for now.
405
    //       << "bitrate=\"" << mpds.kbrate << "\" "
405
    //       << "bitrate=\"" << mpds.kbrate << "\" "
406
       << "sampleFrequency=\"44100\" audioChannels=\"2\" "
406
       << "sampleFrequency=\"44100\" audioChannels=\"2\" "
407
       << "protocolInfo=\"http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000\""
407
       << "protocolInfo=\"http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000\""
408
       << ">"
408
       << ">"
409
       << SoapArgs::xmlQuote(song.uri) 
409
       << SoapHelp::xmlQuote(song.uri) 
410
       << "</res>"
410
       << "</res>"
411
       << "</item></DIDL-Lite>";
411
       << "</item></DIDL-Lite>";
412
    return ss.str();
412
    return ss.str();
413
}
413
}
414
414