Skip to content

Commit c33bcd8

Browse files
Code review: Remove TODO, Add error message for missing m3u8 playlist id in soundcloud stream content chunk url
1 parent 89b6a74 commit c33bcd8

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

app/src/main/java/org/schabi/newpipe/player/datasource/RefreshableHlsHttpDataSource.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,18 @@ public long open(final DataSpec dataSpec) throws HttpDataSourceException {
6262
}
6363

6464
if (!url.contains(refreshableStream.playlistId())) {
65-
// TODO: throw error or no?
6665
if (DEBUG) {
6766
Log.e(TAG, "Playlist id does not match");
6867
}
68+
69+
final var errorMsg = String.format("""
70+
HLS m3u8 playlist does not contain expected playlist id.
71+
Expected: %s
72+
Actual url: %s""",
73+
refreshableStream.playlistId(),
74+
url);
75+
76+
throw new IllegalStateException(errorMsg);
6977
}
7078
return chunkUrlMap.isEmpty()
7179
? openInternal(dataSpec)

0 commit comments

Comments
 (0)