Skip to content

Commit

Permalink
Anilibria support suspended
Browse files Browse the repository at this point in the history
  • Loading branch information
idlesign committed Feb 23, 2025
1 parent 4e5b52c commit 8aa0b76
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ torrt changelog
===============


Unreleased
----------
* Anilibria support suspended.


v1.0.0 [2021-12-26]
-------------------
! Celebrating 1.0.0.
Expand Down
1 change: 0 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
3 changes: 3 additions & 0 deletions tests/test_trackers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions tests/trackers/test_anilibria.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
5 changes: 4 additions & 1 deletion torrt/base_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand Down Expand Up @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions torrt/trackers/anilibria.py
Original file line number Diff line number Diff line change
Expand Up @@ -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] = [
Expand Down

0 comments on commit 8aa0b76

Please sign in to comment.