Make gstreamer discoverer handle next url too
This commit is contained in:
@@ -664,13 +664,22 @@ void Player::EngineMetadataReceived(const Engine::SimpleMetaBundle &bundle) {
|
||||
PlaylistItemPtr item = app_->playlist_manager()->active()->current_item();
|
||||
if (!item) return;
|
||||
|
||||
if (bundle.url != item->Url()) return;
|
||||
if (bundle.url == item->Url()) {
|
||||
Song song = item->Metadata();
|
||||
bool minor = song.MergeFromSimpleMetaBundle(bundle);
|
||||
app_->playlist_manager()->active()->SetStreamMetadata(item->Url(), song, minor);
|
||||
return;
|
||||
}
|
||||
|
||||
Engine::SimpleMetaBundle bundle_copy = bundle;
|
||||
Song song = item->Metadata();
|
||||
bool minor = song.MergeFromSimpleMetaBundle(bundle);
|
||||
|
||||
app_->playlist_manager()->active()->SetStreamMetadata(item->Url(), song, minor);
|
||||
if (app_->playlist_manager()->active()->next_row() != -1) {
|
||||
PlaylistItemPtr next_item = app_->playlist_manager()->active()->item_at(app_->playlist_manager()->active()->next_row());
|
||||
if (bundle.url == next_item->Url()) {
|
||||
Song song = next_item->Metadata();
|
||||
song.MergeFromSimpleMetaBundle(bundle);
|
||||
next_item->SetTemporaryMetadata(song);
|
||||
app_->playlist_manager()->active()->ItemChanged(next_item);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user