mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 15:56:07 -07:00
Add datestamp and timestamp notification options
This commit is contained in:
parent
cc857364f4
commit
651b57a93f
3 changed files with 94 additions and 2 deletions
|
@ -16,7 +16,6 @@
|
|||
|
||||
import re
|
||||
import time
|
||||
import re
|
||||
|
||||
from plexpy import logger, config, notifiers, database, helpers, plextv, pmsconnect
|
||||
import plexpy
|
||||
|
@ -525,6 +524,8 @@ def build_notify_text(session=None, timeline=None, state=None):
|
|||
'server_uptime': server_uptime,
|
||||
'streams': stream_count,
|
||||
'action': state,
|
||||
'datestamp': time.strftime(helpers.parse_js_date(plexpy.CONFIG.DATE_FORMAT)),
|
||||
'timestamp': time.strftime(helpers.parse_js_date(plexpy.CONFIG.TIME_FORMAT)),
|
||||
'user': user,
|
||||
'platform': platform,
|
||||
'player': player,
|
||||
|
@ -792,7 +793,9 @@ def build_server_notify_text(state=None):
|
|||
|
||||
available_params = {'server_name': server_name,
|
||||
'server_uptime': server_uptime,
|
||||
'action': state}
|
||||
'action': state,
|
||||
'datestamp': time.strftime(helpers.parse_js_date(plexpy.CONFIG.DATE_FORMAT)),
|
||||
'timestamp': time.strftime(helpers.parse_js_date(plexpy.CONFIG.TIME_FORMAT))}
|
||||
|
||||
# Default text
|
||||
subject_text = 'PlexPy (%s)' % server_name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue