fix empty regex
This commit is contained in:
parent
a35f66c387
commit
95a68cfc46
1 changed files with 1 additions and 1 deletions
|
@ -184,7 +184,7 @@ def video_check(info, *, incomplete):
|
||||||
vid_details["channel"] = info.get("channel")
|
vid_details["channel"] = info.get("channel")
|
||||||
print(info.get("channel"))
|
print(info.get("channel"))
|
||||||
print(info.get("title"))
|
print(info.get("title"))
|
||||||
banned_video = re.compile(os.getenv("BLOCK_REGEX",""), re.IGNORECASE).findall(f"{vid_details['title']} {vid_details['channel']}")
|
banned_video = re.compile((os.getenv("BLOCK_REGEX","^\b$") if os.getenv("BLOCK_REGEX","^\b$") != "" else "^\b$"), re.IGNORECASE).findall(f"{vid_details['title']} {vid_details['channel']}")
|
||||||
if (duration and duration >= ((float(os.getenv("MAX_MIN")) * 60) + 480)) or banned_video:
|
if (duration and duration >= ((float(os.getenv("MAX_MIN")) * 60) + 480)) or banned_video:
|
||||||
return "video too long" #TODO why is this an issue if its the second video played
|
return "video too long" #TODO why is this an issue if its the second video played
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue