|
a/upmpd/ohplaylist.cxx |
|
b/upmpd/ohplaylist.cxx |
|
... |
|
... |
97 |
bind(&OHPlaylist::idArrayChanged, this, _1, _2));
|
97 |
bind(&OHPlaylist::idArrayChanged, this, _1, _2));
|
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 |
dmcacheRestore(dev->getMetaCacheFn().c_str(), m_metacache);
|
103 |
dmcacheRestore(dev->getMetaCacheFn().c_str(), m_metacache);
|
|
|
104 |
}
|
103 |
}
|
105 |
}
|
104 |
|
106 |
|
105 |
static const int tracksmax = 16384;
|
107 |
static const int tracksmax = 16384;
|
106 |
|
108 |
|
107 |
static string mpdstatusToTransportState(MpdStatus::State st)
|
109 |
static string mpdstatusToTransportState(MpdStatus::State st)
|
|
... |
|
... |
191 |
LOGDEB("OHPlaylist::makeIdArray: dropping uri " << it->first << endl);
|
193 |
LOGDEB("OHPlaylist::makeIdArray: dropping uri " << it->first << endl);
|
192 |
}
|
194 |
}
|
193 |
|
195 |
|
194 |
// If we added entries or there are some stale entries, the new
|
196 |
// If we added entries or there are some stale entries, the new
|
195 |
// map differs, save it to cache
|
197 |
// map differs, save it to cache
|
|
|
198 |
if ((m_dev->m_options & UpMpd::upmpdOhMetaPersist) &&
|
196 |
if (!m_metacache.empty() || m_cachedirty) {
|
199 |
!m_metacache.empty() || m_cachedirty) {
|
197 |
LOGDEB("OHPlaylist::makeIdArray: saving metacache" << endl);
|
200 |
LOGDEB("OHPlaylist::makeIdArray: saving metacache" << endl);
|
198 |
dmcacheSave(m_dev->getMetaCacheFn().c_str(), nmeta);
|
201 |
dmcacheSave(m_dev->getMetaCacheFn().c_str(), nmeta);
|
199 |
m_cachedirty = false;
|
202 |
m_cachedirty = false;
|
200 |
}
|
203 |
}
|
201 |
m_metacache = nmeta;
|
204 |
m_metacache = nmeta;
|