From 9fa41f68c1860d3e0b3636e1733b9258f64ecc24 Mon Sep 17 00:00:00 2001 From: lzzy12 Date: Mon, 30 Mar 2020 18:16:54 +0530 Subject: [PATCH] Some minor Fix-ups Signed-off-by: lzzy12 --- .../mirror_utils/download_utils/youtube_dl_download_helper.py | 2 +- bot/modules/mirror.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bot/helper/mirror_utils/download_utils/youtube_dl_download_helper.py b/bot/helper/mirror_utils/download_utils/youtube_dl_download_helper.py index c4c9a5d..07d99fb 100644 --- a/bot/helper/mirror_utils/download_utils/youtube_dl_download_helper.py +++ b/bot/helper/mirror_utils/download_utils/youtube_dl_download_helper.py @@ -67,7 +67,7 @@ class YoutubeDLHelper(DownloadHelper): def extractMetaData(self, link): if 'hotstar' in link: - self.opts['geo-bypass-country'] = 'IN' + self.opts['geo_bypass_country'] = 'IN' with YoutubeDL(self.opts) as ydl: result = ydl.extract_info(link, download=False) diff --git a/bot/modules/mirror.py b/bot/modules/mirror.py index da49283..bdb61f7 100644 --- a/bot/modules/mirror.py +++ b/bot/modules/mirror.py @@ -22,6 +22,7 @@ import os class MirrorListener(listeners.MirrorListeners): + def __init__(self, bot, update, isTar=False, tag=None): super().__init__(bot, update) self.isTar = isTar @@ -97,6 +98,9 @@ class MirrorListener(listeners.MirrorListeners): def onUploadStarted(self): pass + def onUploadProgress(self): + pass + def onUploadComplete(self, link: str): with download_dict_lock: msg = f'{download_dict[self.uid].name()} ({download_dict[self.uid].size()})'