[check] some changes
This commit is contained in:
parent
044830f2a4
commit
26b37e3d48
@ -84,7 +84,7 @@ async def play_tg_file(c: Client, m: Message, replied: Message = None, link: str
|
|||||||
suhu = await m.reply("📥 downloading audio...")
|
suhu = await m.reply("📥 downloading audio...")
|
||||||
dl = await replied.download()
|
dl = await replied.download()
|
||||||
link = replied.link
|
link = replied.link
|
||||||
songname = "Audio"
|
songname = "music"
|
||||||
thumbnail = f"{IMG_5}"
|
thumbnail = f"{IMG_5}"
|
||||||
duration = "00:00"
|
duration = "00:00"
|
||||||
try:
|
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)
|
thumbnail = await user.download_media(replied.audio.thumbs[0].file_id)
|
||||||
duration = convert_seconds(replied.audio.duration)
|
duration = convert_seconds(replied.audio.duration)
|
||||||
elif replied.voice:
|
elif replied.voice:
|
||||||
songname = "Voice Note"
|
songname = "voice note"
|
||||||
duration = convert_seconds(replied.voice.duration)
|
duration = convert_seconds(replied.voice.duration)
|
||||||
except BaseException:
|
except BaseException:
|
||||||
pass
|
pass
|
||||||
@ -115,7 +115,7 @@ async def play_tg_file(c: Client, m: Message, replied: Message = None, link: str
|
|||||||
title = songname
|
title = songname
|
||||||
userid = m.from_user.id
|
userid = m.from_user.id
|
||||||
image = await thumb(thumbnail, title, userid, ctitle)
|
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})"
|
requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})"
|
||||||
buttons = stream_markup(user_id)
|
buttons = stream_markup(user_id)
|
||||||
await suhu.delete()
|
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,
|
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()
|
await suhu.delete()
|
||||||
buttons = stream_markup(user_id)
|
buttons = stream_markup(user_id)
|
||||||
requester = (
|
requester = (
|
||||||
@ -231,7 +231,7 @@ async def play(c: Client, m: Message):
|
|||||||
query = m.text.split(None, 1)[1]
|
query = m.text.split(None, 1)[1]
|
||||||
search = ytsearch(query)
|
search = ytsearch(query)
|
||||||
if search == 0:
|
if search == 0:
|
||||||
await suhu.edit("❌ **no results found.**")
|
await suhu.edit("❌ **no results found**")
|
||||||
else:
|
else:
|
||||||
songname = search[0]
|
songname = search[0]
|
||||||
title = search[0]
|
title = search[0]
|
||||||
@ -249,7 +249,7 @@ async def play(c: Client, m: Message):
|
|||||||
if chat_id in QUEUE:
|
if chat_id in QUEUE:
|
||||||
await suhu.edit("🔄 Queueing Track...")
|
await suhu.edit("🔄 Queueing Track...")
|
||||||
pos = add_to_queue(
|
pos = add_to_queue(
|
||||||
chat_id, songname, ytlink, url, "Audio", 0
|
chat_id, songname, ytlink, url, "music", 0
|
||||||
)
|
)
|
||||||
await suhu.delete()
|
await suhu.delete()
|
||||||
buttons = stream_markup(user_id)
|
buttons = stream_markup(user_id)
|
||||||
@ -273,7 +273,7 @@ async def play(c: Client, m: Message):
|
|||||||
),
|
),
|
||||||
stream_type=StreamType().local_stream,
|
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()
|
await suhu.delete()
|
||||||
buttons = stream_markup(user_id)
|
buttons = stream_markup(user_id)
|
||||||
requester = (
|
requester = (
|
||||||
@ -323,7 +323,7 @@ async def play(c: Client, m: Message):
|
|||||||
else:
|
else:
|
||||||
if chat_id in QUEUE:
|
if chat_id in QUEUE:
|
||||||
await suhu.edit("🔄 Queueing Track...")
|
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()
|
await suhu.delete()
|
||||||
requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})"
|
requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})"
|
||||||
buttons = stream_markup(user_id)
|
buttons = stream_markup(user_id)
|
||||||
@ -346,7 +346,7 @@ async def play(c: Client, m: Message):
|
|||||||
),
|
),
|
||||||
stream_type=StreamType().local_stream,
|
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()
|
await suhu.delete()
|
||||||
requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})"
|
requester = f"[{m.from_user.first_name}](tg://user?id={m.from_user.id})"
|
||||||
buttons = stream_markup(user_id)
|
buttons = stream_markup(user_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user