mediaplayer: Support m3u playlists containing urls
fix #6670 Change-Id: I8e15b1a79f1d2a687108c3c2a1fc3fc341b79cc5 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4050 Tested-by: Commit checker robot <[email protected]> Reviewed-by: Jérôme Duval <[email protected]> Reviewed-by: Axel Dörfler <[email protected]>
This commit is contained in:
committed by
Axel Dörfler
parent
a2603a88fd
commit
e3fa7914c6
@@ -596,7 +596,15 @@ Playlist::AppendM3uToPlaylist(const entry_ref& ref, Playlist* playlist)
|
|||||||
if (item == NULL || !playlist->AddItem(item))
|
if (item == NULL || !playlist->AddItem(item))
|
||||||
delete item;
|
delete item;
|
||||||
} else {
|
} else {
|
||||||
printf("Error - %s: [%" B_PRIx32 "]\n", strerror(err), err);
|
BUrl url(line.String());
|
||||||
|
if (url.IsValid()) {
|
||||||
|
PlaylistItem* item
|
||||||
|
= new (std::nothrow) UrlPlaylistItem(url);
|
||||||
|
if (item == NULL || !playlist->AddItem(item))
|
||||||
|
delete item;
|
||||||
|
} else {
|
||||||
|
printf("Error - %s: [%" B_PRIx32 "]\n", strerror(err), err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user