diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html index dcc8e164..66c28bd1 100644 --- a/data/interfaces/default/settings.html +++ b/data/interfaces/default/settings.html @@ -766,13 +766,17 @@ available_notification_agents = notifiers.available_notification_agents()

+ + + + - - + + @@ -782,6 +786,10 @@ available_notification_agents = notifiers.available_notification_agents() + + + + @@ -798,10 +806,6 @@ available_notification_agents = notifiers.available_notification_agents() - - - - diff --git a/plexpy/notification_handler.py b/plexpy/notification_handler.py index 5330b7e5..3358df3f 100644 --- a/plexpy/notification_handler.py +++ b/plexpy/notification_handler.py @@ -303,8 +303,12 @@ def build_notify_text(session, state): duration = helpers.convert_milliseconds_to_minutes(item_metadata['duration']) view_offset = helpers.convert_milliseconds_to_minutes(session['view_offset']) + ip_address = 'IP unknown' stream_duration = 0 if state != 'play': + if session['ip_address'].index('.') > -1: + ip_address = session['ip_address'] + if session['paused_counter']: stream_duration = int((time.time() - helpers.cast_to_float(session['started']) - helpers.cast_to_float(session['paused_counter'])) / 60) @@ -315,6 +319,7 @@ def build_notify_text(session, state): available_params = {'server_name': server_name, 'user': session['friendly_name'], + 'ip_address': ip_address, 'player': session['player'], 'title': full_title, 'show_name': item_metadata['grandparent_title'],
{server_name}The name of your Plex Server.
{user} The username of the person streaming.
{server_name}The name of your Plex Server.{ip_address}The IP address of the person streaming.
{player}{platform} The type of client being used for playback.
{transcode_decision}The transcode decisions for the media item.
{title} The title of the item being played back.{album_name} The title of the album being played back if item is track.
{transcode_decision}The transcode decisions for the media item.
{year} The release year for the media item.