forked from j62/ctbrec
Fixed bug in JSON parsing
Some models wouldn't get recorded, because of a missing element in the JSON doc
This commit is contained in:
parent
caf329eb23
commit
b6e4bad837
|
@ -95,9 +95,8 @@ public class StripchatModel extends AbstractModel {
|
|||
best.width = broadcastSettings.optInt("width");
|
||||
best.mediaPlaylistUrl = "https://b-" + serverName + ".stripst.com/hls/" + streamName + "/" + streamName + ".m3u8";
|
||||
sources.add(best);
|
||||
Object resolutionObject = broadcastSettings.get("resolutions");
|
||||
if (resolutionObject instanceof JSONObject) {
|
||||
JSONObject resolutions = (JSONObject) resolutionObject;
|
||||
JSONObject resolutions = broadcastSettings.optJSONObject("resolutions");
|
||||
if (resolutions instanceof JSONObject) {
|
||||
JSONArray heights = resolutions.names();
|
||||
for (int i = 0; i < heights.length(); i++) {
|
||||
String h = heights.getString(i);
|
||||
|
|
Loading…
Reference in New Issue