async def genres():
builder = InlineKeyboardBuilder()
all_genres = await get_genres()
for genre in all_genres:
builder.add(inline_keyboard=InlineKeyboardButton(text=genre.name, callback_data=f'genre_{genre.name}'))
builder.add(inline_keyboard=InlineKeyboardButton(text='Назад', callback_data='back'))
return builder.adjust(1, 1)
async def urls():
builder = InlineKeyboardBuilder()
all_urls = await get_stationurls_from_genres()
for url in all_urls():
builder.add(inline_keyboard=InlineKeyboardButton(text=url.name, callback_data=f'genre_{url.name}'))
builder.add(inline_keyboard=InlineKeyboardButton(text='Назад', callback_data='back'))
return builder.adjust(1, 1)