mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Add stream not available with non-premium error notice
This commit is contained in:
parent
f51bdeaec7
commit
5b3466d06d
1 changed files with 6 additions and 2 deletions
|
|
@ -80,9 +80,13 @@ func fromVideoStreams(crunchy *Crunchyroll, endpoint string) (streams []*Stream,
|
||||||
json.NewDecoder(resp.Body).Decode(&jsonBody)
|
json.NewDecoder(resp.Body).Decode(&jsonBody)
|
||||||
|
|
||||||
if len(jsonBody) == 0 {
|
if len(jsonBody) == 0 {
|
||||||
// this may get thrown when the crunchyroll account has just a normal account and not one with premium
|
// this may get thrown when the crunchyroll account is just a normal account and not one with premium
|
||||||
|
if !crunchy.Config.Premium {
|
||||||
|
return nil, fmt.Errorf("no stream available, this might be the result of using a non-premium account")
|
||||||
|
} else {
|
||||||
return nil, errors.New("no stream available")
|
return nil, errors.New("no stream available")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
audioLocale := jsonBody["audio_locale"].(string)
|
audioLocale := jsonBody["audio_locale"].(string)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue