Skip to content

Commit

Permalink
Fixed bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
SantiiRepair committed Oct 10, 2023
1 parent d27eba6 commit 519eb01
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ docker-down:
docker-compose down --volumes

install:
pip install --no-deps -U pytgcalls==3.0.0.dev24 tgcalls==3.0.0.dev6
pip install --no-deps pytgcalls==3.0.0.dev24 tgcalls==3.0.0.dev6
pip install -r requirements-dev.txt
pip install -r requirements.txt

Expand Down
4 changes: 2 additions & 2 deletions bot/helpers/queues.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def add_or_create_queue(
]
values: bytes = pickle.dumps(kw)
queue: dict = r.hgetall("queues")
giq: list = pickle.loads(queue[group_id])
if group_id in queue:
if group_id in queue:
giq: list = pickle.loads(queue[group_id])
giq.append(values)
hset = r.hset("queues", group_id, pickle.dumps(giq))
if hset == 0:
Expand Down
2 changes: 1 addition & 1 deletion bot/plugins/commands/leave.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
async def _(client: Client, message: Message):
try:
if VOICE_CHATS.get(message.chat.id) is None:
raise Exception("No streams")
raise Exception("no streams")
await VOICE_CHATS[message.chat.id].leave_current_group_call()
VOICE_CHATS.pop(message.chat.id)
remove_queue(str(message.chat.id))
Expand Down
2 changes: 1 addition & 1 deletion bot/plugins/commands/play_book.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async def _(client: Client, message: Message):
await on_call.start(message.chat.id)
VOICE_CHATS[message.chat.id] = on_call
await sleep(2)
await on_call.start_audio(audiobook, repeat=False)
await VOICE_CHATS[message.chat.id].start_audio(audiobook, repeat=False)
if "epub" in file_type:
epub = epublib.read_epub(f)
for item in epub.get_items_of_type(ITEM_IMAGE):
Expand Down
6 changes: 3 additions & 3 deletions bot/plugins/commands/play_song.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async def _(client: Client, message: Message):
name = search[0]
ref = search[1]
duration = search[2]
fmt = "best[height<=?720][width<=?1280]"
fmt = "bestaudio/best"
_, url = await ytdl(fmt, ref)
if search == 0:
return await msg.edit(
Expand Down Expand Up @@ -115,7 +115,7 @@ async def _(client: Client, message: Message):
await on_call.start(message.chat.id)
VOICE_CHATS[message.chat.id] = on_call
await sleep(2)
await on_call.start_audio(url, repeat=False)
await VOICE_CHATS[message.chat.id].start_audio(url, repeat=False)
await msg.edit(
f"**__Started Streaming__**\n\n **Title**: [{name}]({url})\n **Duration:** {duration} **Minutes\n Requested by:** [{data['first_name']}]({data['mention']})",
# file=thumb,
Expand Down Expand Up @@ -186,7 +186,7 @@ async def _(client: Client, message: Message):
await on_call.start(message.chat.id)
VOICE_CHATS[message.chat.id] = on_call
await sleep(2)
await on_call.start_audio(media, repeat=False)
await VOICE_CHATS[message.chat.id].start_audio(media, repeat=False)
await msg.delete()
await kreacher.send_photo(
message.chat.id,
Expand Down
6 changes: 3 additions & 3 deletions bot/plugins/commands/play_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async def _(client: Client, message: Message):
)
await msg.edit("🔄 **__Starting live video stream...__**")
await sleep(2)
await on_call.start_video(
await VOICE_CHATS[message.chat.id].start_video(
query,
enable_experimental_lip_sync=True,
repeat=False,
Expand Down Expand Up @@ -145,7 +145,7 @@ async def _(client: Client, message: Message):
await on_call.start(message.chat.id)
VOICE_CHATS[message.chat.id] = on_call
await sleep(2)
await on_call.start_video(
await VOICE_CHATS[message.chat.id].start_video(
url,
enable_experimental_lip_sync=True,
repeat=False,
Expand Down Expand Up @@ -208,7 +208,7 @@ async def _(client: Client, message: Message):
await on_call.start(message.chat.id)
VOICE_CHATS[message.chat.id] = on_call
await sleep(2)
await on_call.start_video(
await VOICE_CHATS[message.chat.id].start_video(
media, enable_experimental_lip_sync=True, repeat=False
)
# await msg.delete()
Expand Down
2 changes: 1 addition & 1 deletion bot/plugins/commands/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ async def _(client: Client, message: Message):
await on_call.start(message.chat.id)
VOICE_CHATS[message.chat.id] = on_call
await sleep(2)
await on_call.start_video(
await VOICE_CHATS[message.chat.id].start_video(
video,
enable_experimental_lip_sync=True,
repeat=False,
Expand Down

0 comments on commit 519eb01

Please sign in to comment.