mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 21:51:14 -07:00
Identify if a stream is using Plex Relay
This commit is contained in:
parent
8620546d07
commit
b87eb68bdd
4 changed files with 20 additions and 10 deletions
1
API.md
1
API.md
|
@ -401,6 +401,7 @@ Returns:
|
||||||
"quality_profile": "Original",
|
"quality_profile": "Original",
|
||||||
"rating": "7.8",
|
"rating": "7.8",
|
||||||
"rating_key": "153037",
|
"rating_key": "153037",
|
||||||
|
"relay": 0,
|
||||||
"section_id": "2",
|
"section_id": "2",
|
||||||
"session_id": "helf15l3rxgw01xxe0jf3l3d",
|
"session_id": "helf15l3rxgw01xxe0jf3l3d",
|
||||||
"session_key": "27",
|
"session_key": "27",
|
||||||
|
|
|
@ -279,16 +279,20 @@ DOCUMENTATION :: END
|
||||||
<span id="location-${sk}">${data['location'].upper()}</span>:
|
<span id="location-${sk}">${data['location'].upper()}</span>:
|
||||||
% if data['ip_address'] != 'N/A':
|
% if data['ip_address'] != 'N/A':
|
||||||
<span class="ip-container"><span class="ip-address">${data['ip_address']}</span></span>
|
<span class="ip-container"><span class="ip-address">${data['ip_address']}</span></span>
|
||||||
<a href="#" class="external_ip-modal" data-toggle="modal" data-target="#ip-info-modal" data-ip="${data['ip_address']}">
|
% if data['relay']:
|
||||||
<span id="external_ip-${sk}" class="external-ip-tooltip" data-toggle="tooltip" title="Lookup External IP" style="display: none;"><i class="fa fa-map-marker"></i></span>
|
<span data-toggle="tooltip" title="Plex Relay"><i class="fa fa-exclamation-circle"></i></span>
|
||||||
</a>
|
% else:
|
||||||
<script>
|
<a href="#" class="external_ip-modal" data-toggle="modal" data-target="#ip-info-modal" data-ip="${data['ip_address']}">
|
||||||
isPrivateIP("${data['ip_address']}").then(function () {
|
<span id="external_ip-${sk}" class="external-ip-tooltip" data-toggle="tooltip" title="Lookup External IP" style="display: none;"><i class="fa fa-map-marker"></i></span>
|
||||||
$("#external_ip-${sk}").hide();
|
</a>
|
||||||
}, function () {
|
<script>
|
||||||
$("#external_ip-${sk}").show();
|
isPrivateIP("${data['ip_address']}").then(function () {
|
||||||
});
|
$("#external_ip-${sk}").hide();
|
||||||
</script>
|
}, function () {
|
||||||
|
$("#external_ip-${sk}").show();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
% endif
|
||||||
% else:
|
% else:
|
||||||
N/A
|
N/A
|
||||||
% endif
|
% endif
|
||||||
|
|
|
@ -1404,6 +1404,10 @@ class PmsConnect(object):
|
||||||
'location': 'wan' if player_details['local'] == '0' else 'lan'
|
'location': 'wan' if player_details['local'] == '0' else 'lan'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Check if using Plex Relay
|
||||||
|
session_details['relay'] = int(session_details['location'] != 'lan'
|
||||||
|
and player_details['ip_address_public'] == '127.0.0.1')
|
||||||
|
|
||||||
# Get the transcode details
|
# Get the transcode details
|
||||||
if session.getElementsByTagName('TranscodeSession'):
|
if session.getElementsByTagName('TranscodeSession'):
|
||||||
transcode_info = session.getElementsByTagName('TranscodeSession')[0]
|
transcode_info = session.getElementsByTagName('TranscodeSession')[0]
|
||||||
|
|
|
@ -4706,6 +4706,7 @@ class WebInterface(object):
|
||||||
"quality_profile": "Original",
|
"quality_profile": "Original",
|
||||||
"rating": "7.8",
|
"rating": "7.8",
|
||||||
"rating_key": "153037",
|
"rating_key": "153037",
|
||||||
|
"relay": 0,
|
||||||
"section_id": "2",
|
"section_id": "2",
|
||||||
"session_id": "helf15l3rxgw01xxe0jf3l3d",
|
"session_id": "helf15l3rxgw01xxe0jf3l3d",
|
||||||
"session_key": "27",
|
"session_key": "27",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue