Group
Groups help combine Anime from different sources into one, unified model which
can be used to extract a lot more information.
-
class
AnimeGroup
(uids, title, language, is_dub, *, animes=None)[source]
-
coroutine
add_anime
(self, anime)[source]
- Return type
None
-
coroutine
add_animes
(self, animes)[source]
- Return type
None
-
animes
- Return type
List
[SourceAnime
]
-
coroutine
could_contain
(self, anime)[source]
- Return type
bool
-
episode_count
- Return type
int
-
coroutine
get
(self, index)[source]
- Return type
EpisodeGroup
-
is_dub
- Return type
bool
-
language
- Return type
Language
-
source_count
- Return type
int
-
state
- Return type
Dict
[str
, Any
]
-
thumbnail
- Return type
str
-
title
- Return type
str
-
uid
- Return type
UID
-
class
EpisodeGroup
(animes, index)[source]
-
episodes
- Return type
List
[Episode
]
-
raw_streams
- Return type
List
[str
]
-
state
- Return type
Dict
[str
, Any
]
-
working_streams
- Return type
List
[Stream
]
-
class
HasAnimesMixin
[source]
-
coroutine
get_from_all
(self, attr, containers=None, *, timeout=None, strategy=<WaitStrategy.SMART: 1>)[source]
- Return type
List
[Any
]
-
coroutine
get_from_first
(self, attr, containers=None)[source]
- Return type
Any
-
coroutine
wait_for_all
(self, fs, *, timeout=None, strategy=<WaitStrategy.SMART: 1>)[source]
- Return type
List
[Any
]
-
class
WaitStrategy
[source]
An enumeration.
-
ALL
= 0
-
SMART
= 1
-
coroutine
get_anime_group
(uid)[source]
- Return type
Optional
[AnimeGroup
]
-
coroutine
get_anime_group_by_title
(title, language, dubbed)[source]
- Return type
Optional
[AnimeGroup
]
-
coroutine
group_animes
(animes, *, unique_groups=True)[source]
- Return type
List
[AnimeGroup
]
-
coroutine
smart_wait
(fs, *, result_selector=None, timeout=None)[source]
Wait for at least one future to complete.
Wait for the first future to complete and then give the other futures
half the time it took for the first future.
- Parameters
fs (Iterable
[Awaitable
[~T]]) – Iterable of futures to wait for
result_selector (Optional
[Callable
[[~T], bool
]]) – Selector which selects which values are to be accepted.
Invalid values will not be returned or count toward the first result.
timeout (Optional
[float
]) – Time to wait for the first result
- Return type
List
[~T]
- Returns
List of results of the futures that completed in time.