mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 21:03:21 -07:00
Merge pull request #346 from JonnyWong16/miscellaneous-fixes
Fix current activity
This commit is contained in:
commit
f6e77cc578
2 changed files with 4 additions and 4 deletions
|
@ -1046,6 +1046,6 @@ class DataFactory(object):
|
||||||
ip_address = 'N/A'
|
ip_address = 'N/A'
|
||||||
|
|
||||||
for item in result:
|
for item in result:
|
||||||
ip_address = item[0]
|
ip_address = item['ip_address']
|
||||||
|
|
||||||
return ip_address
|
return ip_address
|
||||||
|
|
|
@ -315,13 +315,13 @@ def build_notify_text(session=None, timeline=None, state=None):
|
||||||
# Check for exclusion tags
|
# Check for exclusion tags
|
||||||
if metadata['media_type'] == 'movie':
|
if metadata['media_type'] == 'movie':
|
||||||
# Regex pattern to remove the text in the tags we don't want
|
# Regex pattern to remove the text in the tags we don't want
|
||||||
pattern = re.compile('<tv>[^>]+.</tv>|<music>[^>]+.</music>', re.IGNORECASE|re.DOTALL)
|
pattern = re.compile('\n*<tv>[^>]+.</tv>\n*|\n*<music>[^>]+.</music>\n*', re.IGNORECASE|re.DOTALL)
|
||||||
elif metadata['media_type'] == 'show' or metadata['media_type'] == 'episode':
|
elif metadata['media_type'] == 'show' or metadata['media_type'] == 'episode':
|
||||||
# Regex pattern to remove the text in the tags we don't want
|
# Regex pattern to remove the text in the tags we don't want
|
||||||
pattern = re.compile('<movie>[^>]+.</movie>|<music>[^>]+.</music>', re.IGNORECASE|re.DOTALL)
|
pattern = re.compile('\n*<movie>[^>]+.</movie>\n*|\n*?<music>[^>]+.</music>\n*', re.IGNORECASE|re.DOTALL)
|
||||||
elif metadata['media_type'] == 'artist' or metadata['media_type'] == 'track':
|
elif metadata['media_type'] == 'artist' or metadata['media_type'] == 'track':
|
||||||
# Regex pattern to remove the text in the tags we don't want
|
# Regex pattern to remove the text in the tags we don't want
|
||||||
pattern = re.compile('<tv>[^>]+.</tv>|<movie>[^>]+.</movie>', re.IGNORECASE|re.DOTALL)
|
pattern = re.compile('\n*<tv>[^>]+.</tv>\n*|\n*<movie>[^>]+.</movie>\n*', re.IGNORECASE|re.DOTALL)
|
||||||
else:
|
else:
|
||||||
pattern = None
|
pattern = None
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue