Add ip_address to notification options
* Also track_name
This commit is contained in:
@@ -882,13 +882,17 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
|
||||
<td width="150"><strong>{player}</strong></td>
|
||||
<td>The name of the device being used for playback.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150"><strong>{ip_address}</strong></td>
|
||||
<td>The IP address of the device being used for playback. (PMS 0.9.14 and above)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150"><strong>{media_type}</strong></td>
|
||||
<td>The type of media being played (movie, episode, track).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150"><strong>{title}</strong></td>
|
||||
<td>The title of the item being played.</td>
|
||||
<td>The full title of the item being played.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150"><strong>{show_name}</strong></td>
|
||||
@@ -906,6 +910,10 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
|
||||
<td width="150"><strong>{album_name}</strong></td>
|
||||
<td>The title of the album being played.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150"><strong>{track_name}</strong></td>
|
||||
<td>The title of the track being played.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150"><strong>{season_num}</strong></td>
|
||||
<td>The season number for the media item if item is episode.</td>
|
||||
|
@@ -355,6 +355,7 @@ def build_notify_text(session=None, timeline=None, state=None):
|
||||
user = ''
|
||||
platform = ''
|
||||
player = ''
|
||||
ip_address = 'N/A'
|
||||
|
||||
# Session values
|
||||
if session:
|
||||
@@ -383,6 +384,7 @@ def build_notify_text(session=None, timeline=None, state=None):
|
||||
user = session['friendly_name']
|
||||
platform = session['platform']
|
||||
player = session['player']
|
||||
ip_address = session['ip_address'] if session['ip_address'] != '' else 'N/A'
|
||||
|
||||
progress_percent = helpers.get_percent(view_offset, duration)
|
||||
|
||||
@@ -390,12 +392,14 @@ def build_notify_text(session=None, timeline=None, state=None):
|
||||
'user': user,
|
||||
'platform': platform,
|
||||
'player': player,
|
||||
'ip_address': ip_address,
|
||||
'media_type': metadata['media_type'],
|
||||
'title': full_title,
|
||||
'show_name': metadata['grandparent_title'],
|
||||
'episode_name': metadata['title'],
|
||||
'artist_name': metadata['grandparent_title'],
|
||||
'album_name': metadata['parent_title'],
|
||||
'track_name': metadata['title'],
|
||||
'season_num': metadata['parent_index'],
|
||||
'season_num00': metadata['parent_index'].zfill(2),
|
||||
'episode_num': metadata['index'],
|
||||
|
Reference in New Issue
Block a user