Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
update oftitle
Browse files Browse the repository at this point in the history
  • Loading branch information
feederbox826 committed Dec 9, 2023
1 parent 6fd59ac commit 2caffa4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion SHALookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
success_tag = config.success_tag if hasattr(config, 'success_tag') else "SHA: Match"
failure_tag = config.failure_tag if hasattr(config, 'failure_tag') else "SHA: No Match"

VERSION = "1.4.0"
VERSION = "1.4.1"
MAX_TITLE_LENGTH = 64

try:
Expand Down
2 changes: 1 addition & 1 deletion SHALookup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ sceneByFragment:
- SHALookup.py
- query

# Last Updated 2023-12-06
# Last Updated 2023-12-09
4 changes: 2 additions & 2 deletions oftitle.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import re

dmRegex = "(?:^|\s*|[^\w]*)(dm)(?:[\'\‘\’\`\"\“\”]*)(?:s?)(?:$|\s*|[^\w]*)"
dmRegex = "\b(dm)(?:[\'\‘\’\`\"\“\”]*)(?:s?)\b"
triggerArray = [
# DM / in your DMs
"dm",
Expand Down Expand Up @@ -38,7 +38,7 @@ def findTrailerTrigger(oftitle):
return True
# check other regex array
for trigger in triggerArray:
triggerRegex = "(?:^|\s)(" + trigger + ")(?:$|\s)"
triggerRegex = f"\b{trigger}\b"
if re.search(triggerRegex, oftitle, re.IGNORECASE):
return True
return False

0 comments on commit 2caffa4

Please sign in to comment.