Skip to content

Commit

Permalink
bad backcompat for watch.. blame red guy
Browse files Browse the repository at this point in the history
  • Loading branch information
IguanasInPyjamas committed Oct 15, 2020
1 parent 7211b50 commit 93b3d75
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions anime_downloader/watch.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,16 @@ def _sorting_for_list(self, animes):

def _get_anime_info_class(self, url):
cls = get_anime_class(url)
if not cls:
logger.warn(f"The url: {url} is no longer supported. The provider needs to be set manually upon selection.")

"""
Literally the only way to make sure the watch list doesn't fail when people delete providers from ALL_ANIME_SITES.
If nyaa needs to go, change this to another website. The other alternative is to make a invalidURL provider. However, that causes issues
in that the user will theoretically be able to choose invalidURL as a provider. Honestly, this is a stupid way to provide backcompatability...
"""
url = "https://nyaa.si"
cls = get_anime_class(url)

# TODO: Maybe this is better off as a mixin
class AnimeInfo(cls, sitename=cls.sitename):
Expand Down

2 comments on commit 93b3d75

@AbdullahM0hamed
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea what I'm being blamed for. Went all the way back to July commits, and the only commit I made that I found where I deleted stuff from ALL_ANIME_SITES was 92d99c0#diff-50b3e5019b90904da68c3ebae65dd5cc092cd4bbcf4483b2f9d99768c825a8ef - and I somehow doubt this is what you're referring to.

@IguanasInPyjamas
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, thought you did one at one point. My b

Please sign in to comment.