1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-16 19:31:02 +01:00

Fix playlist wrapping into a last.fm stream, for real this time.

This commit is contained in:
David Sansome 2010-05-19 13:08:52 +00:00
parent 6bf26eca90
commit 33614533d8

View File

@ -575,10 +575,18 @@ void Player::TrackAboutToEnd() {
// Get the actual track URL rather than the stream URL.
if (item->options() & PlaylistItem::ContainsMultipleTracks) {
PlaylistItem::SpecialLoadResult result = item->LoadNext();
if (result.type_ != PlaylistItem::SpecialLoadResult::TrackAvailable)
switch (result.type_) {
case PlaylistItem::SpecialLoadResult::NoMoreTracks:
return;
url = result.media_url_;
case PlaylistItem::SpecialLoadResult::WillLoadAsynchronously:
loading_async_ = item->Url();
return;
case PlaylistItem::SpecialLoadResult::TrackAvailable:
url = result.media_url_;
break;
}
}
engine_->StartPreloading(url);
}