Add type to metadata bundle to avoid updating previous song when it shouldn't

This commit is contained in:
Jonas Kvinge
2021-03-13 03:14:30 +01:00
parent efcdfdf612
commit 2695169514
4 changed files with 30 additions and 20 deletions

View File

@@ -930,9 +930,11 @@ void GstEngine::StreamDiscovered(GstDiscoverer*, GstDiscovererInfo *info, GError
Engine::SimpleMetaBundle bundle;
if (discovered_url == instance->current_pipeline_->stream_url()) {
bundle.type = Engine::SimpleMetaBundle::Type_Current;
bundle.url = instance->current_pipeline_->original_url();
}
else if (discovered_url == instance->current_pipeline_->next_stream_url()) {
bundle.type = Engine::SimpleMetaBundle::Type_Next;
bundle.url = instance->current_pipeline_->next_original_url();
}
bundle.stream_url = QUrl(discovered_url);