This commit is contained in:
levina 2021-09-14 12:02:03 +07:00 committed by GitHub
parent 9867fa9cab
commit 9bfc332e3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,16 +1,8 @@
# Copyright (C) 2021 By VeezMusicProject # Copyright (C) 2021 By VeezMusicProject
import asyncio
from config import Veez
from pyrogram import Client
from youtube_dl import YoutubeDL from youtube_dl import YoutubeDL
from youtube_dl.utils import ExtractorError from youtube_dl.utils import ExtractorError
from pytgcalls.pytgcalls import PyTgCalls
SIGINT: int = 2
FFMPEG_PROCESS = {}
call_py = PyTgCalls(app)
app = Client(Veez.SESSION_NAME, Veez.API_ID, Veez.API_HASH)
############### ###############
# Basic Utils # # Basic Utils #
@ -26,7 +18,7 @@ def raw_converter(dl, song, video):
) )
async def leave_call(chat_id: int): async def leave_call(chat_id: int):
process = FFMPEG_PROCESS.get(chat_id) process = FFMPEG_PROCESSES.get(chat_id)
if process: if process:
try: try:
process.send_signal(SIGINT) process.send_signal(SIGINT)