Parcourir la source

fix new radarr rating in api

CauseFX il y a 4 ans
Parent
commit
5fc9a79549
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3 3
      api/homepage/radarr.php

+ 3 - 3
api/homepage/radarr.php

@@ -329,15 +329,15 @@ trait RadarrHomepageItem
 					"overview" => $child['overview'],
 					"runtime" => $child['runtime'],
 					"image" => $banner,
-					"ratings" => $child['ratings']['value'],
+					"ratings" => $child['ratings']['value'] ?? 0,
 					"videoQuality" => $child["hasFile"] ? @$child['movieFile']['quality']['quality']['name'] : "unknown",
 					"audioChannels" => $child["hasFile"] ? @$child['movieFile']['mediaInfo']['audioChannels'] : "unknown",
 					"audioCodec" => $child["hasFile"] ? @$child['movieFile']['mediaInfo']['audioFormat'] : "unknown",
 					"videoCodec" => $child["hasFile"] ? @$child['movieFile']['mediaInfo']['videoCodec'] : "unknown",
 					"size" => $child["hasFile"] ? @$child['movieFile']['size'] : "unknown",
 					"genres" => $child['genres'],
-					"year" => isset($child['year']) ? $child['year'] : '',
-					"studio" => isset($child['studio']) ? $child['studio'] : '',
+					"year" => $child['year'] ?? '',
+					"studio" => $child['studio'] ?? '',
 				);
 				array_push($gotCalendar, array(
 					"id" => "Radarr-" . $number . "-" . $i,