Switch to unified view

a/src/avtransport.cxx b/src/avtransport.cxx
...
...
238
238
239
    const string& uri = mpds.currentsong.uri;
239
    const string& uri = mpds.currentsong.uri;
240
240
241
    // MPD may have switched to the next track, or may be playing
241
    // MPD may have switched to the next track, or may be playing
242
    // something else altogether if some other client told it to
242
    // something else altogether if some other client told it to
243
    if (m_dev->radioPlaying()) {
244
        m_curMetadata = didlmake(mpds.currentsong);
245
    } else {
243
    if (!uri.compare(m_nextUri)) {
246
        if (!uri.compare(m_nextUri)) {
244
        m_uri = m_nextUri;
247
            m_uri = m_nextUri;
245
        m_curMetadata = m_nextMetadata;
248
            m_curMetadata = m_nextMetadata;
246
        m_nextUri.clear();
249
            m_nextUri.clear();
247
        m_nextMetadata.clear();
250
            m_nextMetadata.clear();
248
    } else if (uri.compare(m_uri)) {
251
        } else if (uri.compare(m_uri)) {
249
        // Someone else is controlling mpd. Maybe our own ohplaylist.
252
            // Someone else is controlling mpd. Maybe our own ohplaylist.
250
        m_nextMetadata.clear();
253
            m_nextMetadata.clear();
251
        m_nextUri.clear();
254
            m_nextUri.clear();
252
        m_uri = uri;
255
            m_uri = uri;
253
        if (!m_ohp || !m_ohp->cacheFind(uri, m_curMetadata)) {
256
            if (!m_ohp || !m_ohp->cacheFind(uri, m_curMetadata)) {
254
            m_curMetadata = didlmake(mpds.currentsong);
257
                m_curMetadata = didlmake(mpds.currentsong);
255
        }
258
            }
259
        }
260
    }
256
    }
261
    
257
258
    status["CurrentTrack"] = "1";
262
    status["CurrentTrack"] = "1";
259
    status["CurrentTrackURI"] = uri;
263
    status["CurrentTrackURI"] = uri;
260
264
261
    // If we own the queue, just use the metadata from the content directory.
265
    // If we own the queue, just use the metadata from the content directory.
262
    // else, try to make up something from mpd status.
266
    // else, try to make up something from mpd status.