From 3011f9a8aec528597e73a525a42619548c94b30e Mon Sep 17 00:00:00 2001 From: Nubuki-all <121189493+Nubuki-all@users.noreply.github.com> Date: Tue, 14 Jan 2025 03:53:28 +0100 Subject: [PATCH] more fixes --- bot/utils/ani_utils.py | 10 +++++----- bot/utils/bot_utils.py | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bot/utils/ani_utils.py b/bot/utils/ani_utils.py index aff544e..2b99052 100644 --- a/bot/utils/ani_utils.py +++ b/bot/utils/ani_utils.py @@ -2,6 +2,7 @@ from datetime import datetime import aiohttp +import anitopy import country_converter as coco import flag import humanize @@ -19,7 +20,6 @@ ) from .bot_utils import ( - anitopy, auto_rename, crc32, encode_job, @@ -383,7 +383,7 @@ async def parse( yr = parsed.get("anime_year") # episode title et = parsed.get("episode_title") - not_allowed = "END", "MULTi", "WEB", "WEB-DL", "DDP5.1", "DDP2.0" + not_allowed = "END", "MULTi", "WEB", "WEB-DL", "DDP5.1", "DDP2.0", "AAC2" et = None if (et and any(nall in et for nall in not_allowed)) else et # source sor = parsed.get("source") @@ -549,7 +549,7 @@ async def custcap( ): if direct: return f"`{direct}`" - if conf.FL_CAP: + if conf.FL_CAP return f"`{fname}`" if not conf.EXT_CAP: return await simplecap( @@ -590,7 +590,7 @@ async def custcap( yr = parsed.get("anime_year") # episode title et = parsed.get("episode_title") - not_allowed = "END", "MULTi", "WEB", "WEB-DL", "DDP5.1", "DDP2.0" + not_allowed = "END", "MULTi", "WEB", "WEB-DL", "DDP5.1", "DDP2.0", "AAC2" et = None if (et and any(nall in et for nall in not_allowed)) else et # source sor = parsed.get("source") @@ -714,7 +714,7 @@ async def simplecap( yr = parsed.get("anime_year") # episode title et = parsed.get("episode_title") - not_allowed = "END", "MULTi", "WEB", "WEB-DL", "DDP5.1", "DDP2.0" + not_allowed = "END", "MULTi", "WEB", "WEB-DL", "DDP5.1", "DDP2.0", "AAC2" et = None if (et and any(nall in et for nall in not_allowed)) else et # source sor = parsed.get("source") diff --git a/bot/utils/bot_utils.py b/bot/utils/bot_utils.py index 6b8983c..78689f4 100644 --- a/bot/utils/bot_utils.py +++ b/bot/utils/bot_utils.py @@ -249,6 +249,8 @@ def patch_parse(filename, options=None): if len(filename.split(".")) > 2: root, ext = os.path.splitext(filename) filename = root.replace(".", " ") + ext + if "varyg" in filename.casefold(): + filename = "[VARYG] " + filename kwargs = {"filename": filename} if options: kwargs.update({"options": options})