media: add Language and Country to Omdb struct (#13)

This commit is contained in:
l3uddz
2021-02-17 22:48:36 +00:00
committed by GitHub
parent 3a8b503af8
commit 54cfd68810
2 changed files with 4 additions and 0 deletions

View File

@@ -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
}

View File

@@ -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"`
}