From e0d100b6274537950ac4e71c5940b580ddd50d25 Mon Sep 17 00:00:00 2001 From: ByteDream Date: Thu, 20 Oct 2022 22:02:44 +0200 Subject: [PATCH] Update dependencies and fix #59 partially --- cli/commands/archive/archive.go | 8 +------- cli/commands/download/download.go | 8 +------- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 5 insertions(+), 17 deletions(-) diff --git a/cli/commands/archive/archive.go b/cli/commands/archive/archive.go index 744635f..b46ea0f 100644 --- a/cli/commands/archive/archive.go +++ b/cli/commands/archive/archive.go @@ -211,10 +211,6 @@ func archive(urls []string) error { episodes, err := archiveExtractEpisodes(url) if err != nil { utils.Log.StopProcess("Failed to parse url %d", i+1) - if utils.Crunchy.Config.Premium { - utils.Log.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/crunchy-labs/crunchy-cli/issues/22 for more information") - } return err } utils.Log.StopProcess("Parsed url %d", i+1) @@ -737,9 +733,7 @@ func archiveExtractEpisodes(url string) ([][]utils.FormatInformation, error) { } } - if _, ok := crunchyroll.ParseBetaEpisodeURL(url); ok { - return nil, fmt.Errorf("archiving episodes by url is no longer supported (thx crunchyroll). use the series url instead and filter after the given episode (https://github.com/crunchy-labs/crunchy-cli/wiki/Cli#filter)") - } else if _, _, _, _, ok := crunchyroll.ParseEpisodeURL(url); ok { + if _, ok := crunchyroll.ParseEpisodeURL(url); ok { return nil, fmt.Errorf("archiving episodes by url is no longer supported (thx crunchyroll). use the series url instead and filter after the given episode (https://github.com/crunchy-labs/crunchy-cli/wiki/Cli#filter)") } diff --git a/cli/commands/download/download.go b/cli/commands/download/download.go index 39273d0..9102e7b 100644 --- a/cli/commands/download/download.go +++ b/cli/commands/download/download.go @@ -139,10 +139,6 @@ func download(urls []string) error { episodes, err := downloadExtractEpisodes(url) if err != nil { utils.Log.StopProcess("Failed to parse url %d", i+1) - if utils.Crunchy.Config.Premium { - utils.Log.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/crunchy-labs/crunchy-cli/issues/22 for more information") - } return err } utils.Log.StopProcess("Parsed url %d", i+1) @@ -284,9 +280,7 @@ func downloadExtractEpisodes(url string) ([][]utils.FormatInformation, error) { var final []*crunchyroll.Episode if downloadAudioFlag != "" { - if _, ok := crunchyroll.ParseBetaEpisodeURL(url); ok { - return nil, fmt.Errorf("downloading episodes by url and specifying a language is no longer supported (thx crunchyroll). use the series url instead and filter after the given episode (https://github.com/crunchy-labs/crunchy-cli/wiki/Cli#filter)") - } else if _, _, _, _, ok := crunchyroll.ParseEpisodeURL(url); ok { + if _, ok := crunchyroll.ParseEpisodeURL(url); ok { return nil, fmt.Errorf("downloading episodes by url and specifying a language is no longer supported (thx crunchyroll). use the series url instead and filter after the given episode (https://github.com/crunchy-labs/crunchy-cli/wiki/Cli#filter)") } diff --git a/go.mod b/go.mod index b297fb0..e04d5ae 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/crunchy-labs/crunchy-cli go 1.19 require ( - github.com/crunchy-labs/crunchyroll-go/v3 v3.0.3 + github.com/crunchy-labs/crunchyroll-go/v3 v3.0.4 github.com/grafov/m3u8 v0.11.1 github.com/spf13/cobra v1.6.0 ) diff --git a/go.sum b/go.sum index 1295653..9ca4b9c 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/crunchy-labs/crunchyroll-go/v3 v3.0.3 h1:hkX7iSUnGt/6Lm/M28a6bAVQNfRFeowchtIh3OOH8Bg= -github.com/crunchy-labs/crunchyroll-go/v3 v3.0.3/go.mod h1:SjTQD3IX7Z+MLsMSd2fP5ttsJ4KtpXY6r08bHLwrOLM= +github.com/crunchy-labs/crunchyroll-go/v3 v3.0.4 h1:QCHlk0PEfrm7uPgLm2RNtwXED3ACKlhD9xlrlGsPhDI= +github.com/crunchy-labs/crunchyroll-go/v3 v3.0.4/go.mod h1:SjTQD3IX7Z+MLsMSd2fP5ttsJ4KtpXY6r08bHLwrOLM= github.com/grafov/m3u8 v0.11.1 h1:igZ7EBIB2IAsPPazKwRKdbhxcoBKO3lO1UY57PZDeNA= github.com/grafov/m3u8 v0.11.1/go.mod h1:nqzOkfBiZJENr52zTVd/Dcl03yzphIMbJqkXGu+u080= github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc=