fix misplaced condition
This commit is contained in:
parent
f549580526
commit
1f26371283
|
@ -315,18 +315,20 @@ public class ChaturbateModel extends AbstractModel {
|
||||||
log.trace("Raw stream info for model {}: {}", getName(), content);
|
log.trace("Raw stream info for model {}: {}", getName(), content);
|
||||||
streamInfo = mapper.readValue(content, StreamInfo.class);
|
streamInfo = mapper.readValue(content, StreamInfo.class);
|
||||||
|
|
||||||
if (streamInfo.cmaf_edge && streamInfo.url.contains("playlist.m3u8")) {
|
if (streamInfo.cmaf_edge) {
|
||||||
streamInfo.url = streamInfo.url.replace("playlist.m3u8", "playlist_sfm4s.m3u8");
|
if (streamInfo.url.contains("playlist.m3u8")) {
|
||||||
} else if (streamInfo.url.contains("playlist_sfm4s.m3u8")) {
|
streamInfo.url = streamInfo.url.replace("playlist.m3u8", "playlist_sfm4s.m3u8");
|
||||||
streamInfo.url = streamInfo.url.replace("playlist_sfm4s.m3u8", "playlist.m3u8");
|
} else if (streamInfo.url.contains("playlist_sfm4s.m3u8")) {
|
||||||
}
|
streamInfo.url = streamInfo.url.replace("playlist_sfm4s.m3u8", "playlist.m3u8");
|
||||||
|
}
|
||||||
|
|
||||||
var match = serverPattern.matcher(streamInfo.url);
|
var match = serverPattern.matcher(streamInfo.url);
|
||||||
|
|
||||||
if (getSite().getHttpClient().isLoggedIn()) {
|
if (getSite().getHttpClient().isLoggedIn()) {
|
||||||
streamInfo.url = match.replaceFirst("live-fhls/amlst");
|
streamInfo.url = match.replaceFirst("live-fhls/amlst");
|
||||||
} else {
|
} else {
|
||||||
streamInfo.url = match.replaceFirst("live-c-fhls/amlst");
|
streamInfo.url = match.replaceFirst("live-c-fhls/amlst");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return streamInfo;
|
return streamInfo;
|
||||||
|
|
Loading…
Reference in New Issue