mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Refactor to use consts instead of string
This commit is contained in:
parent
3dcfbc0fbb
commit
79c3ba2636
3 changed files with 8 additions and 8 deletions
|
|
@ -23,7 +23,7 @@ func (c *Crunchyroll) Recommendations(limit uint) (s []*Series, m []*Movie, err
|
|||
|
||||
for _, item := range jsonBody["items"].([]interface{}) {
|
||||
switch item.(map[string]interface{})["type"] {
|
||||
case "series":
|
||||
case MediaTypeSeries:
|
||||
series := &Series{
|
||||
crunchy: c,
|
||||
}
|
||||
|
|
@ -35,7 +35,7 @@ func (c *Crunchyroll) Recommendations(limit uint) (s []*Series, m []*Movie, err
|
|||
}
|
||||
|
||||
s = append(s, series)
|
||||
case "movie_listing":
|
||||
case MediaTypeMovie:
|
||||
movie := &Movie{
|
||||
crunchy: c,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue