diff --git a/CHANGELOG b/CHANGELOG index 0f7b128..caf9182 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,11 @@ torrt changelog =============== +Unreleased +---------- +* Anilibria support suspended. + + v1.0.0 [2021-12-26] ------------------- ! Celebrating 1.0.0. diff --git a/README.rst b/README.rst index f8d980f..d173797 100644 --- a/README.rst +++ b/README.rst @@ -31,7 +31,6 @@ Trackers Automatic updates are available for: * AniDUB - http://tr.anidub.com/ -* AniLibria - https://www.anilibria.tv/ * CasStudio - https://casstudio.tv * EniaHD - https://eniahd.com * Kinozal - http://kinozal.tv/ diff --git a/tests/test_trackers.py b/tests/test_trackers.py index 37057f1..f5dc3ea 100644 --- a/tests/test_trackers.py +++ b/tests/test_trackers.py @@ -8,6 +8,9 @@ def test_trackers(): for tracker_alias, tracker_obj in tracker_objects.items(): + if not tracker_obj.active: + continue + urls = tracker_obj.test_urls for url in urls: diff --git a/tests/trackers/test_anilibria.py b/tests/trackers/test_anilibria.py index 49e34a5..9eab91f 100644 --- a/tests/trackers/test_anilibria.py +++ b/tests/trackers/test_anilibria.py @@ -3,6 +3,9 @@ from torrt.trackers.anilibria import AnilibriaTracker +pytest.skip("Inactive", allow_module_level=True) + + @pytest.mark.parametrize("test_input,expected", [ ('https://www.anilibria.tv/release/kabukichou-sherlock.html', 'kabukichou-sherlock'), ('https://www.anilibria.tv/release/mairimashita-iruma-kun.html', 'mairimashita-iruma-kun'), diff --git a/torrt/base_tracker.py b/torrt/base_tracker.py index 6651a38..cc0bc5f 100644 --- a/torrt/base_tracker.py +++ b/torrt/base_tracker.py @@ -18,6 +18,9 @@ class BaseTracker(WithSettings): config_entry_name: str = 'trackers' + active: bool = True + """Tracker support flag. Can be used to skip initialization for currently unavailable trackers.""" + alias: str = None """Tracker alias. Usually main tracker domain. See also `mirrors` attribute.""" @@ -57,7 +60,7 @@ def __init__(self, cookies: dict = None, query_string: str = None): super().__init__() def __init_subclass__(cls, **kwargs): - if cls.alias: + if cls.alias and cls.active: TrackerClassesRegistry.add(cls) def get_query_string(self) -> str: diff --git a/torrt/trackers/anilibria.py b/torrt/trackers/anilibria.py index 59c2045..ea35c68 100644 --- a/torrt/trackers/anilibria.py +++ b/torrt/trackers/anilibria.py @@ -16,6 +16,14 @@ class AnilibriaTracker(GenericPublicTracker): """This class implements .torrent files downloads for https://www.anilibria.tv tracker.""" + active: bool = False + """Seems to be moved for another domain, and changed here and there. + See: + * https://anilibria.top/api/docs/v1 + * https://anilibria.top/anime/releases/release/sword-art-online-alicization + * https://anilibria.top/anime/releases/release/kabukichou-sherlock/episodes + """ + alias: str = 'anilibria.tv' test_urls: List[str] = [