forked from j62/ctbrec
1
0
Fork 0

Make sure, the hlsUrl is available, when loading the master playlist

This commit is contained in:
0xboobface 2018-12-01 00:16:44 +01:00
parent 0e627aef12
commit 52016c6a86
1 changed files with 9 additions and 1 deletions

View File

@ -99,7 +99,7 @@ public class MyFreeCamsModel extends AbstractModel {
}
private MasterPlaylist getMasterPlaylist() throws IOException, ParseException, PlaylistException {
if(hlsUrl == null) {
if(getHlsUrl() == null) {
throw new IllegalStateException("Stream url unknown");
}
LOG.trace("Loading master playlist {}", hlsUrl);
@ -117,6 +117,14 @@ public class MyFreeCamsModel extends AbstractModel {
}
}
private String getHlsUrl() {
if(hlsUrl == null) {
MyFreeCams mfc = (MyFreeCams) getSite();
mfc.getClient().update(this);
}
return hlsUrl;
}
@Override
public void invalidateCacheEntries() {
resolution = null;