merge pull request #25 from levina-lab/issue-13-issues_report

push commit from beta branch
This commit is contained in:
levina 2021-11-01 11:30:04 +07:00 committed by GitHub
commit 21b10e20f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 13 deletions

View File

@ -25,3 +25,4 @@ DURATION_LIMIT = int(getenv("DURATION_LIMIT", "60"))
IMG_1 = getenv("IMG_1", "https://telegra.ph/file/d6f92c979ad96b2031cba.png")
IMG_2 = getenv("IMG_2", "https://telegra.ph/file/6213d2673486beca02967.png")
IMG_3 = getenv("IMG_3", "https://telegra.ph/file/f02efde766160d3ff52d6.png")
IMG_4 = getenv("IMG_4", "https://telegra.ph/file/19ef76c0a097b1a394b00.png")

View File

@ -1,6 +1,6 @@
from driver.queues import QUEUE, clear_queue, get_queue, pop_an_item
from driver.veez import call_py
from pytgcalls.types import Update
from driver.queues import QUEUE, clear_queue, get_queue, pop_an_item
from pytgcalls.types.input_stream import AudioPiped, AudioVideoPiped
from pytgcalls.types.input_stream.quality import (
HighQualityAudio,

View File

@ -168,8 +168,13 @@ async def unmute(client, m: Message):
async def change_volume(client, m: Message):
range = m.command[1]
chat_id = m.chat.id
try:
await call_py.change_volume_call(chat_id, volume=int(range))
await m.reply(f"✅ **volume set to** `{range}`%")
except Exception as e:
await m.reply(f"🚫 **error:**\n\n{e}")
if chat_id in QUEUE:
try:
await call_py.change_volume_call(chat_id, volume=int(range))
await m.reply(
f"✅ **volume set to** `{range}`%"
)
except Exception as e:
await m.reply(f"🚫 **error:**\n\n`{e}`")
else:
await m.reply("❌ **nothing in streaming**")

View File

@ -76,7 +76,10 @@ async def play(_, m: Message):
if replied.audio.title:
songname = replied.audio.title[:70]
else:
songname = replied.audio.file_name[:70]
if replied.audio.file_name:
songname = replied.audio.file_name[:70]
else:
songname = "Audio"
elif replied.voice:
songname = "Voice Note"
if chat_id in QUEUE:

View File

@ -89,12 +89,14 @@ async def vplay(client, m: Message):
await loser.edit(
"» __only 720, 480, 360 allowed__ \n💡 **now streaming video in 720p**"
)
if replied.video:
songname = replied.video.file_name[:70]
elif replied.document:
songname = replied.document.file_name[:70]
try:
if replied.video:
songname = replied.video.file_name[:70]
elif replied.document:
songname = replied.document.file_name[:70]
except BaseException:
songname = "Video"
if chat_id in QUEUE:
pos = add_to_queue(chat_id, songname, dl, link, "Video", Q)
await loser.delete()