add audio quality

This commit is contained in:
levina 2022-01-31 19:47:38 +07:00 committed by GitHub
parent 82cf2802c5
commit 2f11eab1a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,6 +13,7 @@ from pytgcalls.types.input_stream.quality import (
) )
from pytgcalls.types.stream import StreamAudioEnded from pytgcalls.types.stream import StreamAudioEnded
keyboard = InlineKeyboardMarkup( keyboard = InlineKeyboardMarkup(
[ [
[ [
@ -42,6 +43,7 @@ async def skip_current_song(chat_id):
chat_id, chat_id,
AudioPiped( AudioPiped(
url, url,
HighQualityAudio(),
), ),
) )
elif type == "Video": elif type == "Video":
@ -52,7 +54,12 @@ async def skip_current_song(chat_id):
elif Q == 360: elif Q == 360:
hm = LowQualityVideo() hm = LowQualityVideo()
await call_py.change_stream( await call_py.change_stream(
chat_id, AudioVideoPiped(url, HighQualityAudio(), hm) chat_id,
AudioVideoPiped(
url,
HighQualityAudio(),
hm
)
) )
pop_an_item(chat_id) pop_an_item(chat_id)
return [songname, link, type] return [songname, link, type]