--- a/src/mediaserver/cdplugins/spotify/spotiproxy.cpp
+++ b/src/mediaserver/cdplugins/spotify/spotiproxy.cpp
@@ -608,6 +608,7 @@
LOGERR("SpotiFetch::start: getSpotiProxy returned null\n");
return false;
}
+ spp->waitForEndOfPlay();
spp->stop();
m->encoderneedinit = true;
return true;
@@ -638,7 +639,8 @@
}
spp->stop();
if (outqueue) {
- outqueue->setTerminate();
+ outqueue->waitIdle();
+ outqueue->reset();
}
outqueue = queue;
@@ -676,7 +678,7 @@
val = "audio/flac";
LOGDEB("SpotiFetch::headerValue: content-type: " << val << "\n");
return true;
- } else if (!stringlowercmp("content-length", nm)) {
+ } else if (0 && !stringlowercmp("content-length", nm)) {
uint64_t bytes = (spp->durationMs() / 10) * 441 * 4;
ulltodecstr(bytes, val);
LOGDEB("SpotiFetch::headerValue: content-length: " << val << "\n");