add duration info for local video
This commit is contained in:
parent
8b1e384508
commit
2d5e9ce838
@ -135,8 +135,10 @@ async def vplay(c: Client, m: Message):
|
||||
try:
|
||||
if replied.video:
|
||||
songname = replied.video.file_name[:70]
|
||||
duration = replied.video.duration
|
||||
elif replied.document:
|
||||
songname = replied.document.file_name[:70]
|
||||
duration = replied.document.duration
|
||||
except BaseException:
|
||||
songname = "Video"
|
||||
|
||||
@ -148,7 +150,7 @@ async def vplay(c: Client, m: Message):
|
||||
await m.reply_photo(
|
||||
photo=f"{IMG_1}",
|
||||
reply_markup=InlineKeyboardMarkup(buttons),
|
||||
caption=f"💡 **Track added to queue »** `{pos}`\n\n🗂 **Name:** [{songname}]({link}) | `video`\n💭 **Chat:** `{chat_id}`\n🧸 **Request by:** {requester}",
|
||||
caption=f"💡 **Track added to queue »** `{pos}`\n\n🗂 **Name:** [{songname}]({link}) | `video`\n⏱️ **Duration:** `{duration}`\n🧸 **Request by:** {requester}",
|
||||
)
|
||||
else:
|
||||
if Q == 720:
|
||||
@ -174,7 +176,7 @@ async def vplay(c: Client, m: Message):
|
||||
await m.reply_photo(
|
||||
photo=f"{IMG_2}",
|
||||
reply_markup=InlineKeyboardMarkup(buttons),
|
||||
caption=f"🗂 **Name:** [{songname}]({link}) | `video`\n💭 **Chat:** `{chat_id}`\n🧸 **Request by:** {requester}",
|
||||
caption=f"🗂 **Name:** [{songname}]({link}) | `video`\n⏱️ **Duration:** `{duration}`\n🧸 **Request by:** {requester}",
|
||||
)
|
||||
else:
|
||||
if len(m.command) < 2:
|
||||
|
Loading…
Reference in New Issue
Block a user