From 54cfd68810b0f8df15409e5a8e957c5b446c6dc8 Mon Sep 17 00:00:00 2001 From: l3uddz Date: Wed, 17 Feb 2021 22:48:36 +0000 Subject: [PATCH] media: add Language and Country to Omdb struct (#13) --- media/omdb/media.go | 2 ++ media/omdb/struct.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/media/omdb/media.go b/media/omdb/media.go index e5e2e58..ec55888 100644 --- a/media/omdb/media.go +++ b/media/omdb/media.go @@ -69,5 +69,7 @@ func (c *Client) GetItem(imdbId string) (*Item, error) { RottenTomatoes: rt, ImdbRating: util.Atof64(b.ImdbRating, 0.0), ImdbVotes: util.Atoi(b.ImdbVotes, 0), + Language: b.Language, + Country: b.Country, }, nil } diff --git a/media/omdb/struct.go b/media/omdb/struct.go index 99c36e6..513cfc7 100644 --- a/media/omdb/struct.go +++ b/media/omdb/struct.go @@ -38,4 +38,6 @@ type Item struct { RottenTomatoes int `json:"RottenTomatoes,omitempty"` ImdbRating float64 `json:"ImdbRating,omitempty"` ImdbVotes int `json:"ImdbVotes,omitempty"` + Language string `json:"Language,omitempty"` + Country string `json:"Country,omitempty"` }