Skip to content

Commit

Permalink
Fix getting default_cdn for HLS formats.
Browse files Browse the repository at this point in the history
  • Loading branch information
devoxin committed Aug 31, 2024
1 parent d4dd980 commit 85076c4
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,10 @@ public PlaybackFormat getPlaybackFormat(HttpInterface httpInterface, String conf
}

if (!files.get("hls").isNull()) {
JsonBrowser hls = files.get("hls");
// ["akfire_interconnect_quic", "fastly_skyfire"]
JsonBrowser cdns = files.get("hls").get("cdns");
return new PlaybackFormat(cdns.get(cdns.get("default_cdn").text()).get("url").text(), true);
JsonBrowser cdns = hls.get("cdns");
return new PlaybackFormat(cdns.get(hls.get("default_cdn").text()).get("url").text(), true);
}

throw new RuntimeException("No supported formats");
Expand Down

0 comments on commit 85076c4

Please sign in to comment.