|
a/src/ohradio.cxx |
|
b/src/ohradio.cxx |
|
... |
|
... |
281 |
if (reload < 2) {
|
281 |
if (reload < 2) {
|
282 |
reload = 2;
|
282 |
reload = 2;
|
283 |
}
|
283 |
}
|
284 |
radio.nextMetaScriptExecTime = time(0) + reload;
|
284 |
radio.nextMetaScriptExecTime = time(0) + reload;
|
285 |
|
285 |
|
286 |
// If the script returns an audio uri, queue it to mpd
|
286 |
// If the script returns an audio uri, queue it to mpd. Don't do
|
|
|
287 |
// this while stopped
|
287 |
string audioUri= decoded.get("audioUrl", "").asString();
|
288 |
string audioUri= decoded.get("audioUrl", "").asString();
|
288 |
if (!audioUri.empty()) {
|
289 |
if (!audioUri.empty() &&
|
|
|
290 |
(m_playpending || mpds.state == MpdStatus::MPDS_PLAY)) {
|
289 |
vector<UpSong> queue;
|
291 |
vector<UpSong> queue;
|
290 |
m_dev->m_mpdcli->getQueueData(queue);
|
292 |
m_dev->m_mpdcli->getQueueData(queue);
|
291 |
bool found = false;
|
293 |
bool found = false;
|
292 |
for (const auto& entry : queue) {
|
294 |
for (const auto& entry : queue) {
|
293 |
if (entry.uri == audioUri) {
|
295 |
if (entry.uri == audioUri) {
|