Support for old Peertube releases

This commit is contained in:
tom79 2020-03-07 16:16:49 +01:00
parent 81555ecd9c
commit 95e030cb40
1 changed files with 1 additions and 1 deletions

View File

@ -360,7 +360,7 @@ public class API {
}
ArrayList<String> resolutions = new ArrayList<>();
if( resobj.has("streamingPlaylists")){
if( resobj.has("streamingPlaylists") && resobj.getJSONArray("streamingPlaylists").length() > 0){
JSONArray files = resobj.getJSONArray("streamingPlaylists").getJSONObject(0).getJSONArray("files");
for (int j = 0; j < files.length(); j++) {