Switch to unified view

a/upmpd/ohplaylist.cxx b/upmpd/ohplaylist.cxx
...
...
98
    dev->addActionMapping(this, "ProtocolInfo",
98
    dev->addActionMapping(this, "ProtocolInfo",
99
                          bind(&OHPlaylist::protocolInfo, this, _1, _2));
99
                          bind(&OHPlaylist::protocolInfo, this, _1, _2));
100
    dev->m_mpdcli->consume(false);
100
    dev->m_mpdcli->consume(false);
101
    
101
    
102
    if ((dev->m_options & UpMpd::upmpdOhMetaPersist)) {
102
    if ((dev->m_options & UpMpd::upmpdOhMetaPersist)) {
103
        dmcacheRestore(dev->getMetaCacheFn().c_str(), m_metacache);
103
        if (!dmcacheRestore(dev->getMetaCacheFn(), m_metacache)) {
104
            LOGERR("ohPlaylist: cache restore failed" << endl);
105
        } else {
106
            LOGDEB("ohPlaylist: cache restore done" << endl);
107
        }
104
    }
108
    }
105
}
109
}
106
110
107
static const int tracksmax = 16384;
111
static const int tracksmax = 16384;
108
112
...
...
206
    // If we added entries or there are some stale entries, the new
210
    // If we added entries or there are some stale entries, the new
207
    // map differs, save it to cache
211
    // map differs, save it to cache
208
    if ((m_dev->m_options & UpMpd::upmpdOhMetaPersist) &&
212
    if ((m_dev->m_options & UpMpd::upmpdOhMetaPersist) &&
209
        (!m_metacache.empty() || m_cachedirty)) {
213
        (!m_metacache.empty() || m_cachedirty)) {
210
        LOGDEB("OHPlaylist::makeIdArray: saving metacache" << endl);
214
        LOGDEB("OHPlaylist::makeIdArray: saving metacache" << endl);
211
        dmcacheSave(m_dev->getMetaCacheFn().c_str(), nmeta);
215
        dmcacheSave(m_dev->getMetaCacheFn(), nmeta);
212
        m_cachedirty = false;
216
        m_cachedirty = false;
213
    }
217
    }
214
    m_metacache = nmeta;
218
    m_metacache = nmeta;
215
219
216
    return true;
220
    return true;