[check] some changes

This commit is contained in:
levina 2022-02-21 08:27:30 +07:00 committed by GitHub
parent 044830f2a4
commit 26b37e3d48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,7 +84,7 @@ async def play_tg_file(c: Client, m: Message, replied: Message = None, link: str
suhu = await m.reply("📥 downloading audio...")
dl = await replied.download()
link = replied.link
songname = "Audio"
songname = "music"
thumbnail = f"{IMG_5}"
duration = "00:00"
try:
@ -100,7 +100,7 @@ async def play_tg_file(c: Client, m: Message, replied: Message = None, link: str
thumbnail = await user.download_media(replied.audio.thumbs[0].file_id)
duration = convert_seconds(replied.audio.duration)
elif replied.voice:
songname = "Voice Note"
songname = "voice note"
duration = convert_seconds(replied.voice.duration)
except BaseException:
pass
@ -115,7 +115,7 @@ async def play_tg_file(c: Client, m: Message, replied: Message = None, link: str
title = songname
userid = m.from_user.id
image = await thumb(thumbnail, title, userid, ctitle)
pos = add_to_queue(chat_id, songname, dl, link, "Audio", 0)
pos = add_to_queue(chat_id, songname, dl, link, "music", 0)
requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})"
buttons = stream_markup(user_id)
await suhu.delete()
@ -146,7 +146,7 @@ async def play_tg_file(c: Client, m: Message, replied: Message = None, link: str
),
stream_type=StreamType().pulse_stream,
)
add_to_queue(chat_id, songname, dl, link, "Audio", 0)
add_to_queue(chat_id, songname, dl, link, "music", 0)
await suhu.delete()
buttons = stream_markup(user_id)
requester = (
@ -231,7 +231,7 @@ async def play(c: Client, m: Message):
query = m.text.split(None, 1)[1]
search = ytsearch(query)
if search == 0:
await suhu.edit("❌ **no results found.**")
await suhu.edit("❌ **no results found**")
else:
songname = search[0]
title = search[0]
@ -249,7 +249,7 @@ async def play(c: Client, m: Message):
if chat_id in QUEUE:
await suhu.edit("🔄 Queueing Track...")
pos = add_to_queue(
chat_id, songname, ytlink, url, "Audio", 0
chat_id, songname, ytlink, url, "music", 0
)
await suhu.delete()
buttons = stream_markup(user_id)
@ -273,7 +273,7 @@ async def play(c: Client, m: Message):
),
stream_type=StreamType().local_stream,
)
add_to_queue(chat_id, songname, ytlink, url, "Audio", 0)
add_to_queue(chat_id, songname, ytlink, url, "music", 0)
await suhu.delete()
buttons = stream_markup(user_id)
requester = (
@ -323,7 +323,7 @@ async def play(c: Client, m: Message):
else:
if chat_id in QUEUE:
await suhu.edit("🔄 Queueing Track...")
pos = add_to_queue(chat_id, songname, ytlink, url, "Audio", 0)
pos = add_to_queue(chat_id, songname, ytlink, url, "music", 0)
await suhu.delete()
requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})"
buttons = stream_markup(user_id)
@ -346,7 +346,7 @@ async def play(c: Client, m: Message):
),
stream_type=StreamType().local_stream,
)
add_to_queue(chat_id, songname, ytlink, url, "Audio", 0)
add_to_queue(chat_id, songname, ytlink, url, "music", 0)
await suhu.delete()
requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})"
buttons = stream_markup(user_id)