From 6c476df24effcad9d6297c453535ce7f9bcf72db Mon Sep 17 00:00:00 2001 From: bytedream Date: Mon, 16 May 2022 22:07:44 +0200 Subject: [PATCH] Set beta url notice only if account is premium --- cmd/crunchyroll-go/cmd/archive.go | 6 ++++-- cmd/crunchyroll-go/cmd/download.go | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/cmd/crunchyroll-go/cmd/archive.go b/cmd/crunchyroll-go/cmd/archive.go index 6f3f6a0..63e5d5a 100644 --- a/cmd/crunchyroll-go/cmd/archive.go +++ b/cmd/crunchyroll-go/cmd/archive.go @@ -182,8 +182,10 @@ func archive(urls []string) error { episodes, err := archiveExtractEpisodes(url) if err != nil { out.StopProgress("Failed to parse url %d", i+1) - out.Debug("If the error says no episodes could be found but the passed url is correct and a crunchyroll classic url, " + - "try the corresponding crunchyroll beta url instead and try again. See https://github.com/ByteDream/crunchyroll-go/issues/22 for more information") + if crunchy.Config.Premium { + out.Debug("If the error says no episodes could be found but the passed url is correct and a crunchyroll classic url, " + + "try the corresponding crunchyroll beta url instead and try again. See https://github.com/ByteDream/crunchyroll-go/issues/22 for more information") + } return err } out.StopProgress("Parsed url %d", i+1) diff --git a/cmd/crunchyroll-go/cmd/download.go b/cmd/crunchyroll-go/cmd/download.go index 1ce202c..1254048 100644 --- a/cmd/crunchyroll-go/cmd/download.go +++ b/cmd/crunchyroll-go/cmd/download.go @@ -128,8 +128,10 @@ func download(urls []string) error { episodes, err := downloadExtractEpisodes(url) if err != nil { out.StopProgress("Failed to parse url %d", i+1) - out.Debug("If the error says no episodes could be found but the passed url is correct and a crunchyroll classic url, " + - "try the corresponding crunchyroll beta url instead and try again. See https://github.com/ByteDream/crunchyroll-go/issues/22 for more information") + if crunchy.Config.Premium { + out.Debug("If the error says no episodes could be found but the passed url is correct and a crunchyroll classic url, " + + "try the corresponding crunchyroll beta url instead and try again. See https://github.com/ByteDream/crunchyroll-go/issues/22 for more information") + } return err } out.StopProgress("Parsed url %d", i+1)