Skip to content

Commit

Permalink
update french regex (#5)
Browse files Browse the repository at this point in the history
* update french regex

* Update handlers.py
  • Loading branch information
g0ldyy authored Jul 1, 2024
1 parent d04e8c9 commit 27f6b1b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions PTT/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,7 @@ def handle_episodes(context):
parser.add_handler("languages", regex.compile(r"\bCH[IT]\b", regex.IGNORECASE), uniq_concat(value("chinese")), {"skipFromTitle": True, "skipIfAlreadyFound": False})
parser.add_handler("languages", regex.compile(r"\b(chinese|chin[eê]s|chi)\b", regex.IGNORECASE), uniq_concat(value("chinese")), {"skipIfFirst": True, "skipIfAlreadyFound": False})
parser.add_handler("languages", regex.compile(r"\bzh-hans\b", regex.IGNORECASE), uniq_concat(value("chinese")), {"skipIfAlreadyFound": False})
parser.add_handler("languages", regex.compile(r"\bFR(?:ench|a|e|anc[eê]s)?\b", regex.IGNORECASE), uniq_concat(value("french")), {"skipIfAlreadyFound": False})
parser.add_handler("languages", regex.compile(r"\b(Truefrench|VF[FI])\b", regex.IGNORECASE), uniq_concat(value("french")), {"skipIfAlreadyFound": False})
parser.add_handler("languages", regex.compile(r"\b(VOST(?:FR?|A)?|SUBFRENCH)\b", regex.IGNORECASE), uniq_concat(value("french")), {"skipIfAlreadyFound": False})
parser.add_handler("languages", regex.compile(r"\b(VF[FQIB2]?|(TRUE|SUB)?.?FRENCH|(VOST)?FR2?)\b", regex.IGNORECASE), uniq_concat(value("french")), {"skipIfAlreadyFound": False})
parser.add_handler("languages", regex.compile(r"\bspanish\W?latin|american\W*(?:spa|esp?)", regex.IGNORECASE), uniq_concat(value("latino")), { "skipFromTitle": True, "skipIfAlreadyFound": False, "remove": True })
parser.add_handler("languages", regex.compile(r"\b(?:audio.)?lat(?:i|ino)?\b", regex.IGNORECASE), uniq_concat(value("latino")), { "skipIfAlreadyFound": False })
parser.add_handler("languages", regex.compile(r"\b(?:audio.)?(?:ESP|spa|(en[ .]+)?espa[nñ]ola?|castellano)\b", regex.IGNORECASE), uniq_concat(value("spanish")), { "skipIfAlreadyFound": False })
Expand Down

1 comment on commit 27f6b1b

@dreulavelle
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a couple back, but cleaned it up so that all tests pass. It also improved 1 test as well.

Please sign in to comment.