Skip to content

Commit 3109920

Browse files
committed
Support new Metadata.Rating
1 parent e5b4386 commit 3109920

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

models.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ type Metadata struct {
7171
ParentTitle string `json:"parentTitle"`
7272
RatingCount int `json:"ratingCount"`
7373
Rating float64 `json:"rating"`
74+
Ratings []Rating `json:"Rating"`
7475
RatingKey string `json:"ratingKey"`
7576
SessionKey string `json:"sessionKey"`
7677
Summary string `json:"summary"`
@@ -136,7 +137,6 @@ type Media struct {
136137
Height int `json:"height"`
137138
ID json.Number `json:"id"`
138139
OptimizedForStreaming boolOrInt `json:"optimizedForStreaming"` // plex can return int (GetMetadata(), GetPlaylist()) or boolean (GetSessions()): 0 or 1; true or false
139-
140140
Selected bool `json:"selected"`
141141
VideoCodec string `json:"videoCodec"`
142142
VideoFrameRate string `json:"videoFrameRate"`
@@ -894,3 +894,10 @@ type CurrentSessions struct {
894894
Size int `json:"size"`
895895
} `json:"MediaContainer"`
896896
}
897+
898+
// Rating
899+
type Rating struct {
900+
Image string `json:"image"`
901+
Type string `json:"type"`
902+
Value json.Number `json:"value"`
903+
}

0 commit comments

Comments
 (0)