refactor: move available servers to toplevel of animeprovider package

This commit is contained in:
Benex254
2024-08-11 11:21:18 +03:00
parent c4255fc748
commit b4cbb57f29
2 changed files with 11 additions and 4 deletions

View File

@@ -3,8 +3,7 @@ import signal
import click
from .. import __version__
from ..libs.anime_provider import anime_sources
from ..libs.anime_provider.allanime.constants import SERVERS_AVAILABLE
from ..libs.anime_provider import SERVERS_AVAILABLE, anime_sources
from ..Utility.data import anilist_sort_normalizer
from .commands import LazyGroup
@@ -53,7 +52,7 @@ signal.signal(signal.SIGINT, handle_exit)
@click.option(
"-s",
"--server",
type=click.Choice([*SERVERS_AVAILABLE, "top"], case_sensitive=False),
type=click.Choice([*SERVERS_AVAILABLE, "top"]),
help="Server of choice",
)
@click.option(
@@ -77,7 +76,7 @@ signal.signal(signal.SIGINT, handle_exit)
@click.option(
"-q",
"--quality",
type=click.IntRange(0, 3),
type=click.Choice(["360", "720", "1080", "unknown"]),
help="set the quality of the stream",
)
@click.option(

View File

@@ -2,3 +2,11 @@ anime_sources = {
"allanime": "api.AllAnimeAPI",
"animepahe": "api.AnimePaheApi",
}
SERVERS_AVAILABLE = [
"sharepoint",
"dropbox",
"gogoanime",
"weTransfer",
"wixmp",
"kwik",
]