Added client IP address option to notifications

This commit is contained in:
Brian Charbonneau 2015-09-12 21:53:32 -07:00
commit 1deef5c09e
2 changed files with 5 additions and 1 deletions

View file

@ -797,6 +797,9 @@ available_notification_agents = notifiers.available_notification_agents()
<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.</td>
</tr> <tr>
<td width="150"><strong>{platform}</strong></td>
<td>The type of client being used for playback.</td>
</tr>

View file

@ -316,6 +316,7 @@ def build_notify_text(session, state):
available_params = {'server_name': server_name,
'user': session['friendly_name'],
'player': session['player'],
'ip_address': session['ip_address'],
'title': full_title,
'show_name': item_metadata['grandparent_title'],
'episode_name': item_metadata['title'],
@ -493,4 +494,4 @@ def strip_tag(data):
import re
p = re.compile(r'<.*?>')
return p.sub('', data)
return p.sub('', data)