some fixes

This commit is contained in:
levina 2022-01-18 14:47:49 +07:00 committed by GitHub
parent e1258bf490
commit 2051d29e9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,12 +1,15 @@
""" queue storage """
QUEUE = {}
def add_to_queue(chat_id, songname, link, ref, type, quality):
def add_to_queue(chat_id, songname, link, ref, type, quality, image, duration):
if chat_id in QUEUE:
chat_queue = QUEUE[chat_id]
chat_queue.append([songname, link, ref, type, quality])
chat_queue.append([songname, link, ref, type, quality, image, duration])
return int(len(chat_queue)-1)
else:
QUEUE[chat_id] = [[songname, link, ref, type, quality]]
QUEUE[chat_id] = [[songname, link, ref, type, quality, image, duration]]
def get_queue(chat_id):
if chat_id in QUEUE: