Fix crunchyroll api changes

This commit is contained in:
bytedream 2022-08-08 22:20:25 +02:00
parent a64981930b
commit 6239d10d22
3 changed files with 22 additions and 55 deletions

View file

@ -627,6 +627,12 @@ 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 {
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)")
}
episodes, err := utils.ExtractEpisodes(url, languagesAsLocale...)
if err != nil {
return nil, err