Xonshiz / anime-dl

Anime-dl is a command-line program to download anime from CrunchyRoll and Funimation.
MIT License
229 stars 37 forks source link

Prevent downloading of a video resolution other than that specified #87

Open axipher opened 5 years ago

axipher commented 5 years ago

When using the "-r 1080p" flag, the program should fail to download any resolution of a show that isn't 1080p.

The issue here is that if I've downloaded 90 episodes of an ongoing show like Boruto, then one day 1080p isn't available, then it will go through and download all 90 episodes again at whatever resolution it would find.

Nicnl commented 5 years ago

We have to test it more thoroughly
But I think I fixed this one too along with the resolution issues #86

If the requested resolution is weird from the start, it will just stop:
https://github.com/Xonshiz/anime-dl/blob/63d3c74bfd680cc3171e658b6497d1be8c9efd84/anime_dl/sites/crunchyroll.py#L203-L205

And finally if the requested resolution is not found in the master.m3u8 file, it will also stop:
https://github.com/Xonshiz/anime-dl/blob/63d3c74bfd680cc3171e658b6497d1be8c9efd84/anime_dl/sites/crunchyroll.py#L278-L280