mirror of
https://github.com/Benexl/FastAnime.git
synced 2025-12-05 20:40:09 -08:00
Compare commits
2 Commits
71b668894b
...
8e803e8ecb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e803e8ecb | ||
|
|
61fcd39188 |
6
.envrc
6
.envrc
@@ -1,6 +1,6 @@
|
||||
VIU_APP_NAME="viu-dev"
|
||||
PATH="./.venv/bin/:$PATH"
|
||||
PATH="$PWD/.venv/bin:$PATH"
|
||||
export PATH VIU_APP_NAME
|
||||
if command -v nix >/dev/null;then
|
||||
use flake
|
||||
if command -v nix >/dev/null; then
|
||||
use flake
|
||||
fi
|
||||
|
||||
@@ -2,6 +2,7 @@ from typing import TYPE_CHECKING
|
||||
|
||||
import click
|
||||
|
||||
|
||||
from ...core.config import AppConfig
|
||||
from ...core.exceptions import ViuError
|
||||
from ..utils.completion import anime_titles_shell_complete
|
||||
@@ -49,6 +50,7 @@ def search(config: AppConfig, **options: "Unpack[Options]"):
|
||||
SearchParams,
|
||||
)
|
||||
from ...libs.provider.anime.provider import create_provider
|
||||
from viu_media.core.utils.normalizer import normalize_title
|
||||
from ...libs.selectors.selector import create_selector
|
||||
|
||||
if not options["anime_title"]:
|
||||
@@ -67,7 +69,10 @@ def search(config: AppConfig, **options: "Unpack[Options]"):
|
||||
with feedback.progress(f"Fetching anime search results for {anime_title}"):
|
||||
search_results = provider.search(
|
||||
SearchParams(
|
||||
query=anime_title, translation_type=config.stream.translation_type
|
||||
query=normalize_title(
|
||||
anime_title, config.general.provider.value, True
|
||||
).lower(),
|
||||
translation_type=config.stream.translation_type,
|
||||
)
|
||||
)
|
||||
if not search_results:
|
||||
|
||||
@@ -28,7 +28,9 @@ def provider_search(ctx: Context, state: State) -> State | InternalDirective:
|
||||
|
||||
provider_search_results = provider.search(
|
||||
SearchParams(
|
||||
query=normalize_title(media_title, config.general.provider.value, True),
|
||||
query=normalize_title(
|
||||
media_title, config.general.provider.value, True
|
||||
).lower(),
|
||||
translation_type=config.stream.translation_type,
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user