From 5b3466d06d555639aa27f3c13f54ac50b6e1740d Mon Sep 17 00:00:00 2001 From: bytedream Date: Mon, 16 May 2022 22:06:44 +0200 Subject: [PATCH] Add stream not available with non-premium error notice --- stream.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/stream.go b/stream.go index b1193ed..0fa54b9 100644 --- a/stream.go +++ b/stream.go @@ -80,8 +80,12 @@ func fromVideoStreams(crunchy *Crunchyroll, endpoint string) (streams []*Stream, json.NewDecoder(resp.Body).Decode(&jsonBody) if len(jsonBody) == 0 { - // this may get thrown when the crunchyroll account has just a normal account and not one with premium - return nil, errors.New("no stream available") + // 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") + } } audioLocale := jsonBody["audio_locale"].(string)