Move search controls and add result modal
This commit is contained in:
@@ -916,9 +916,12 @@ def episode_language_summary(show_id, provider):
|
||||
return summary
|
||||
|
||||
|
||||
def search_anime(query, mode):
|
||||
def search_anime(query, mode, provider=None):
|
||||
runtime = ensure_runtime()
|
||||
provider = str((runtime.get("config") or {}).get("provider") or "anikoto").strip().lower()
|
||||
configured_provider = str((runtime.get("config") or {}).get("provider") or "anikoto").strip().lower()
|
||||
provider = str(provider or configured_provider).strip().lower()
|
||||
if provider not in provider_bridge.PROVIDERS:
|
||||
provider = configured_provider if configured_provider in provider_bridge.PROVIDERS else "anikoto"
|
||||
data = provider_bridge.search(query, provider=provider, page=1)
|
||||
shows = data.get("results") or []
|
||||
results = []
|
||||
|
||||
Reference in New Issue
Block a user