Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nubuki-all committed Jan 14, 2025
1 parent 6729699 commit 3011f9a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bot/utils/ani_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from datetime import datetime

import aiohttp
import anitopy
import country_converter as coco
import flag
import humanize
Expand All @@ -19,7 +20,6 @@
)

from .bot_utils import (
anitopy,
auto_rename,
crc32,
encode_job,
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 2 additions & 0 deletions bot/utils/bot_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit 3011f9a

Please sign in to comment.