File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/main/java/com/spotifyxp/api Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -287,7 +287,11 @@ public ArrayList<HomeTabSection> getSections() {
287287 public static HomeTab fromJSON (JSONObject json ) {
288288 ArrayList <HomeTabSection > sections = new ArrayList <>();
289289 for (Object sectionObject : json .getJSONObject ("sectionContainer" ).getJSONObject ("sections" ).getJSONArray ("items" )) {
290- sections .add (HomeTabSection .fromJSON (new JSONObject (sectionObject .toString ())));
290+ try {
291+ sections .add (HomeTabSection .fromJSON (new JSONObject (sectionObject .toString ())));
292+ }catch (JSONException e ) {
293+ ConsoleLogging .warning ("[HomeTab] Got section item with unknown/unsupported data" );
294+ }
291295 }
292296 return new HomeTab (
293297 json .getJSONObject ("greeting" ).getString ("text" ),
You can’t perform that action at this time.
0 commit comments