mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 13:41:15 -07:00
Add lazy quantifier to notifications media tag regex
This commit is contained in:
parent
dbe783d31d
commit
a3a62b1d94
1 changed files with 3 additions and 3 deletions
|
@ -492,13 +492,13 @@ def build_notify_text(session=None, timeline=None, notify_action=None, agent_id=
|
|||
# Check for exclusion tags
|
||||
if metadata['media_type'] == 'movie':
|
||||
# Regex pattern to remove the text in the tags we don't want
|
||||
pattern = re.compile(r'<movie>|</movie>|<tv>.*</tv>|<music>.*</music>', re.IGNORECASE | re.DOTALL)
|
||||
pattern = re.compile(r'<movie>|</movie>|<tv>.*?</tv>|<music>.*?</music>', re.IGNORECASE | re.DOTALL)
|
||||
elif metadata['media_type'] == 'show' or metadata['media_type'] == 'episode':
|
||||
# Regex pattern to remove the text in the tags we don't want
|
||||
pattern = re.compile(r'<movie>.*</movie>|<tv>|</tv>|<music>.*</music>', re.IGNORECASE | re.DOTALL)
|
||||
pattern = re.compile(r'<movie>.*?</movie>|<tv>|</tv>|<music>.*?</music>', re.IGNORECASE | re.DOTALL)
|
||||
elif metadata['media_type'] == 'artist' or metadata['media_type'] == 'track':
|
||||
# Regex pattern to remove the text in the tags we don't want
|
||||
pattern = re.compile(r'<movie>.*</movie>|<tv>.*</tv>|<music>|</music>', re.IGNORECASE | re.DOTALL)
|
||||
pattern = re.compile(r'<movie>.*?</movie>|<tv>.*?</tv>|<music>|</music>', re.IGNORECASE | re.DOTALL)
|
||||
else:
|
||||
pattern = None
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue