removed bug (and added too)

This commit is contained in:
Hodza Alban 2017-08-19 17:34:53 +02:00 committed by GitHub
parent 03effcb540
commit 6fd4285b3b

View File

@ -20,8 +20,14 @@ def get_format(bot, update):
except BadLink:
update.message.reply_text("Bad link")
else:
reply_markup = InlineKeyboardMarkup(video.keyboard)
for i, v in enumerate(VIDEOS):
if v.chat_id == video.chat_id:
VIDEOS[i] = video # remove old video not downloaded...
break
else:
VIDEOS.append(video)
reply_markup = InlineKeyboardMarkup(video.keyboard)
update.message.reply_text('Choose format:', reply_markup=reply_markup)