Add changing preview type when searching track

This commit is contained in:
BarsTiger
2023-11-07 18:45:41 +02:00
parent 06c327933f
commit e99ba9daa3
12 changed files with 54 additions and 23 deletions

View File

@@ -3,13 +3,14 @@ from aiogram.types import (
)
from bot.modules.url import recognise_music_service, get_id
from bot.modules.settings import UserSettings
from ..common.search import get_common_search_result
import inspect
async def get_url_results(query: str) -> list[
async def get_url_results(query: str, settings: UserSettings) -> list[
InlineQueryResultDocument | InlineQueryResultCachedAudio
]:
service = recognise_music_service(query)
@@ -25,5 +26,6 @@ async def get_url_results(query: str) -> list[
audio=audio,
db_table=service.db_table,
service_id=service.name,
settings=settings
)
]