Only preview notification text for valid media types

This commit is contained in:
JonnyWong16 2016-11-04 23:30:30 -07:00
parent 580595e5fa
commit 0ab9cdf97c
4 changed files with 39 additions and 20 deletions

View file

@ -580,7 +580,7 @@ def build_notify_text(subject='', body='', notify_action=None, parameters=None,
elif media_type == 'track':
pattern = re.compile(all_tags.replace('<track>.*?</track>', '<track>|</track>'), re.IGNORECASE | re.DOTALL)
else:
pattern = None
pattern = re.compile(all_tags, re.IGNORECASE | re.DOTALL)
if pattern:
# Remove the unwanted tags and strip any unmatch tags too.