mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-31 12:00:08 -07:00
Better IP address handling for current activity
This commit is contained in:
parent
80df8f6191
commit
d79d5d5b39
2 changed files with 6 additions and 2 deletions
|
@ -32,6 +32,7 @@ user_thumb Returns the profile picture of the user owning the s
|
|||
state Returns the state of the current session. Either 'playing', 'paused' or 'buffering'.
|
||||
title Returns the name of the episode, movie or music track.
|
||||
year Returns the year of the episode, movie, or clip.
|
||||
ip_address Returns the ip address of the stream.
|
||||
player Returns the name of the platform used to play the stream.
|
||||
platform Returns the type of platform used to play the stream.
|
||||
throttled Returns true if the transcode session is throttled.
|
||||
|
@ -192,7 +193,11 @@ DOCUMENTATION :: END
|
|||
% if a['media_type'] != 'photo':
|
||||
<div class="dashboard-activity-poster-info-bar">
|
||||
<div class="dashboard-activity-poster-info-ip-address">
|
||||
% if a['ip_address']:
|
||||
<span>IP: ${a['ip_address']}</span>
|
||||
% else:
|
||||
<span>IP: N/A</span>
|
||||
% endif
|
||||
</div>
|
||||
<div class="dashboard-activity-poster-info-time">
|
||||
<span class="progress_time">${a['view_offset']}</span>/<span class="progress_time">${a['duration']}</span>
|
||||
|
|
|
@ -1004,8 +1004,7 @@ class DataFactory(object):
|
|||
monitor_db = database.MonitorDatabase()
|
||||
|
||||
if session_key:
|
||||
query = 'SELECT CASE WHEN ip_address IS NULL THEN "N/A" ELSE ip_address END ' \
|
||||
'FROM sessions WHERE session_key = %d' % int(session_key)
|
||||
query = 'SELECT ip_address FROM sessions WHERE session_key = %d' % int(session_key)
|
||||
result = monitor_db.select(query)
|
||||
else:
|
||||
return None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue