From 3109920327fffadfb9eaef3b18487c5f2bc51756 Mon Sep 17 00:00:00 2001 From: Martin Disibio Date: Fri, 2 Dec 2022 15:42:24 -0500 Subject: [PATCH] Support new Metadata.Rating --- models.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/models.go b/models.go index cc5bfe2..0eed6c5 100644 --- a/models.go +++ b/models.go @@ -71,6 +71,7 @@ type Metadata struct { ParentTitle string `json:"parentTitle"` RatingCount int `json:"ratingCount"` Rating float64 `json:"rating"` + Ratings []Rating `json:"Rating"` RatingKey string `json:"ratingKey"` SessionKey string `json:"sessionKey"` Summary string `json:"summary"` @@ -136,7 +137,6 @@ type Media struct { Height int `json:"height"` ID json.Number `json:"id"` OptimizedForStreaming boolOrInt `json:"optimizedForStreaming"` // plex can return int (GetMetadata(), GetPlaylist()) or boolean (GetSessions()): 0 or 1; true or false - Selected bool `json:"selected"` VideoCodec string `json:"videoCodec"` VideoFrameRate string `json:"videoFrameRate"` @@ -894,3 +894,10 @@ type CurrentSessions struct { Size int `json:"size"` } `json:"MediaContainer"` } + +// Rating +type Rating struct { + Image string `json:"image"` + Type string `json:"type"` + Value json.Number `json:"value"` +}