fix misplaced condition

This commit is contained in:
reusedname 2025-03-14 11:50:47 +05:00
parent f549580526
commit 1f26371283
1 changed files with 14 additions and 12 deletions

View File

@ -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()) {
streamInfo.url = match.replaceFirst("live-fhls/amlst"); if (getSite().getHttpClient().isLoggedIn()) {
} else { streamInfo.url = match.replaceFirst("live-fhls/amlst");
streamInfo.url = match.replaceFirst("live-c-fhls/amlst"); } else {
streamInfo.url = match.replaceFirst("live-c-fhls/amlst");
}
} }
return streamInfo; return streamInfo;