Update dependencies and fix #59 partially

This commit is contained in:
ByteDream 2022-10-20 22:02:44 +02:00
parent cd1587c613
commit e0d100b627
4 changed files with 5 additions and 17 deletions

View file

@ -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)")
}

View file

@ -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)")
}

2
go.mod
View file

@ -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
)

4
go.sum
View file

@ -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=