Clear streamSources list before update

This commit is contained in:
0xboobface 2018-11-16 11:14:13 +01:00
parent 11133f309d
commit 3241066303
1 changed files with 1 additions and 0 deletions

View File

@ -106,6 +106,7 @@ public class BongaCamsModel extends AbstractModel {
PlaylistParser parser = new PlaylistParser(inputStream, Format.EXT_M3U, Encoding.UTF_8);
Playlist playlist = parser.parse();
MasterPlaylist master = playlist.getMasterPlaylist();
streamSources.clear();
for (PlaylistData playlistData : master.getPlaylists()) {
StreamSource streamsource = new StreamSource();
streamsource.mediaPlaylistUrl = streamUrl.replace("playlist.m3u8", playlistData.getUri());