Fix youtube downloading wrong track, saving exceptions, attempt to fix deezer

This commit is contained in:
BarsTiger committed 2023-10-30 23:39:54 +02:00
1 parent 2ae18aacae
commit 8cd956388e
13 files changed
+272 -39

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
from aiogram.utils.keyboard import (InlineKeyboardMarkup, InlineKeyboardButton,
InlineKeyboardBuilder)
deezer = {
'd': '🎵 Search in Deezer'
}
soundcloud = {
'c': '☁️ Search in SoundCloud'
}
youtube = {
'y': '▶️ Search in YouTube'
}
spotify = {
's': '🎧 Search in Spotify'
}
def get_search_variants_kb(
query: str,
services: dict[str, str],
) -> InlineKeyboardMarkup:
buttons = [
[
InlineKeyboardButton(
text=services[key],
switch_inline_query_current_chat=f'{key}:{query}'
)
] for key in services.keys()
]
return InlineKeyboardBuilder(buttons).as_markup()