Skip to content

Commit

Permalink
no need in ytdl
Browse files Browse the repository at this point in the history
  • Loading branch information
weebzone authored Nov 29, 2022
1 parent 95deed1 commit f40850c
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions bot/helper/mirror_utils/download_utils/yt_dlp_download_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
from json import loads as jsonloads
from re import search as re_search

from bot import download_dict_lock, download_dict, STORAGE_THRESHOLD
from bot import download_dict_lock, download_dict
from bot.helper.ext_utils.bot_utils import get_readable_file_size
from bot.helper.telegram_helper.message_utils import sendStatusMessage
from ..status_utils.yt_dlp_download_status import YtDlpDownloadStatus
from bot.helper.ext_utils.fs_utils import check_storage_threshold

LOGGER = getLogger(__name__)

Expand Down Expand Up @@ -207,12 +206,6 @@ def add_download(self, link, path, name, qual, playlist, args):
self.extractMetaData(link, name, args)
if self.__is_cancelled:
return
if STORAGE_THRESHOLD is not None:
acpt = check_storage_threshold(self.size, self.__listener.isZip)
if not acpt:
msg = f'You must leave {STORAGE_THRESHOLD}GB free storage.'
msg += f'\nYour File/Folder size is {get_readable_file_size(self.size)}'
return self.__onDownloadError(msg)
if self.is_playlist:
self.opts['outtmpl'] = f"{path}/{self.name}/%(title,fulltitle,alt_title)s%(season_number& |)s%(season_number&S|)s%(season_number|)02d%(episode_number&E|)s%(episode_number|)02d%(height& |)s%(height|)s%(height&p|)s%(fps|)s%(fps&fps|)s%(tbr& |)s%(tbr|)d.%(ext)s"
elif not args:
Expand Down Expand Up @@ -248,4 +241,4 @@ def __set_args(self, args):
varg = tuple(map(int, varg.split(',')))
elif varg.startswith('{') and varg.endswith('}'):
varg = jsonloads(varg)
self.opts[karg] = varg
self.opts[karg] = varg

0 comments on commit f40850c

Please sign in to comment.