forked from j62/ctbrec
1
0
Fork 0

Make sure the playlist is not empty when checking the online state

This commit is contained in:
0xboobface 2019-04-07 12:03:00 +02:00
parent 9647f1160f
commit 2a74761c54
1 changed files with 6 additions and 1 deletions

View File

@ -71,7 +71,12 @@ public class BongaCamsModel extends AbstractModel {
String url = getStreamUrl();
Request req = new Request.Builder().url(url).build();
try(Response resp = site.getHttpClient().execute(req)) {
return resp.isSuccessful();
if(resp.isSuccessful()) {
String body = resp.body().string();
return body.contains("#EXT-X-STREAM-INF");
} else {
return false;
}
}
}