Compare commits
8 Commits
v2.1.27-be
...
v2.1.28
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e949b1486e | ||
![]() |
8e1b6efc51 | ||
![]() |
00012ffe09 | ||
![]() |
bcf6b4de77 | ||
![]() |
b1516e9963 | ||
![]() |
231de3a7a5 | ||
![]() |
b611ea659e | ||
![]() |
6e9f299c19 |
@@ -1,5 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
## v2.1.28 (2019-03-10)
|
||||
|
||||
* Monitoring:
|
||||
* New: Added secure/insecure connection icon on the activity cards. Requires Plex Media Server v1.15+
|
||||
* Other:
|
||||
* Change: Improved mass deleting of all images from Cloudinary. Requires all previous images on Cloudinary to be manually tagged with "tautulli". New uploads are automatically tagged.
|
||||
|
||||
|
||||
## v2.1.27-beta (2019-03-03)
|
||||
|
||||
* Monitoring:
|
||||
|
@@ -283,10 +283,17 @@ DOCUMENTATION :: END
|
||||
<li class="dashboard-activity-info-item">
|
||||
<div class="sub-heading">Location</div>
|
||||
<div class="sub-value time-right">
|
||||
% if data['secure'] is not None:
|
||||
% if data['secure']:
|
||||
<span data-toggle="tooltip" title="Secure Connection"><i class="fa fa-lock"></i></span>
|
||||
% else:
|
||||
<span data-toggle="tooltip" title="Insecure Connection"><i class="fa fa-unlock"></i></span>
|
||||
% endif
|
||||
% endif
|
||||
<span id="location-${sk}">${data['location'].upper()}</span>:
|
||||
% if data['ip_address'] != 'N/A':
|
||||
<span class="ip-container"><span class="ip-address">${data['ip_address']}</span></span>
|
||||
% if data['relay']:
|
||||
% if data['relayed']:
|
||||
<span data-toggle="tooltip" title="Plex Relay"><i class="fa fa-exclamation-circle"></i></span>
|
||||
% else:
|
||||
<a href="#" class="external_ip-modal" data-toggle="modal" data-target="#ip-info-modal" data-ip="${data['ip_address']}">
|
||||
|
@@ -24,8 +24,10 @@
|
||||
# - The example settings in this file assume that Tautulli is installed to: /opt/Tautulli
|
||||
#
|
||||
# - To create this user and give it ownership of the Tautulli directory:
|
||||
# 1. Create the user:
|
||||
# Ubuntu/Debian: sudo addgroup tautulli && sudo adduser --system --no-create-home tautulli --ingroup tautulli
|
||||
# CentOS/Fedora: sudo adduser --system --no-create-home tautulli
|
||||
# 2. Give the user ownership of the Tautulli directory:
|
||||
# sudo chown tautulli:tautulli -R /opt/Tautulli
|
||||
#
|
||||
# - Adjust ExecStart= to point to:
|
||||
|
@@ -1259,6 +1259,9 @@ class DataFactory(object):
|
||||
'GROUP BY rating_key' % where
|
||||
results = monitor_db.select(query, args=args)
|
||||
|
||||
if delete_all:
|
||||
helpers.delete_from_cloudinary(delete_all=delete_all)
|
||||
else:
|
||||
for cloudinary_info in results:
|
||||
helpers.delete_from_cloudinary(rating_key=cloudinary_info['rating_key'])
|
||||
|
||||
|
@@ -818,7 +818,7 @@ def upload_to_cloudinary(img_data, img_title='', rating_key='', fallback=''):
|
||||
try:
|
||||
response = upload('data:image/png;base64,{}'.format(base64.b64encode(img_data)),
|
||||
public_id='{}_{}'.format(fallback, rating_key),
|
||||
tags=[fallback, str(rating_key)],
|
||||
tags=['tautulli', fallback, str(rating_key)],
|
||||
context={'title': img_title.encode('utf-8'), 'rating_key': str(rating_key), 'fallback': fallback})
|
||||
logger.debug(u"Tautulli Helpers :: Image '{}' ({}) uploaded to Cloudinary.".format(img_title, fallback))
|
||||
img_url = response.get('url', '')
|
||||
@@ -828,7 +828,7 @@ def upload_to_cloudinary(img_data, img_title='', rating_key='', fallback=''):
|
||||
return img_url
|
||||
|
||||
|
||||
def delete_from_cloudinary(rating_key):
|
||||
def delete_from_cloudinary(rating_key=None, delete_all=False):
|
||||
""" Deletes an image from Cloudinary """
|
||||
if not plexpy.CONFIG.CLOUDINARY_CLOUD_NAME or not plexpy.CONFIG.CLOUDINARY_API_KEY or not plexpy.CONFIG.CLOUDINARY_API_SECRET:
|
||||
logger.error(u"Tautulli Helpers :: Cannot delete image from Cloudinary. Cloudinary settings not specified in the settings.")
|
||||
@@ -840,9 +840,15 @@ def delete_from_cloudinary(rating_key):
|
||||
api_secret=plexpy.CONFIG.CLOUDINARY_API_SECRET
|
||||
)
|
||||
|
||||
if delete_all:
|
||||
delete_resources_by_tag('tautulli')
|
||||
logger.debug(u"Tautulli Helpers :: Deleted all images from Cloudinary.")
|
||||
elif rating_key:
|
||||
delete_resources_by_tag(str(rating_key))
|
||||
|
||||
logger.debug(u"Tautulli Helpers :: Deleted images from Cloudinary with rating_key {}.".format(rating_key))
|
||||
else:
|
||||
logger.debug(u"Tautulli Helpers :: Unable to delete images from Cloudinary: No rating_key provided.")
|
||||
|
||||
return True
|
||||
|
||||
|
||||
|
@@ -1510,7 +1510,9 @@ class PmsConnect(object):
|
||||
'player': helpers.get_xml_attr(player_info, 'title') or helpers.get_xml_attr(player_info, 'product'),
|
||||
'machine_id': helpers.get_xml_attr(player_info, 'machineIdentifier'),
|
||||
'state': helpers.get_xml_attr(player_info, 'state'),
|
||||
'local': helpers.get_xml_attr(player_info, 'local')
|
||||
'local': int(helpers.get_xml_attr(player_info, 'local') == '1'),
|
||||
'relayed': helpers.get_xml_attr(player_info, 'relayed', default_return=None),
|
||||
'secure': helpers.get_xml_attr(player_info, 'secure', default_return=None)
|
||||
}
|
||||
|
||||
# Get the session details
|
||||
@@ -1524,12 +1526,20 @@ class PmsConnect(object):
|
||||
else:
|
||||
session_details = {'session_id': '',
|
||||
'bandwidth': '',
|
||||
'location': 'wan' if player_details['local'] == '0' else 'lan'
|
||||
'location': 'lan' if player_details['local'] else 'wan'
|
||||
}
|
||||
|
||||
# Check if using Plex Relay
|
||||
session_details['relay'] = int(session_details['location'] != 'lan'
|
||||
and player_details['ip_address_public'] == '127.0.0.1')
|
||||
if player_details['relayed'] is None:
|
||||
player_details['relayed'] = int(session_details['location'] != 'lan' and
|
||||
player_details['ip_address_public'] == '127.0.0.1')
|
||||
|
||||
else:
|
||||
player_details['relayed'] = helpers.cast_to_int(player_details['relayed'])
|
||||
|
||||
# Check if secure connection
|
||||
if player_details['secure'] is not None:
|
||||
player_details['secure'] = int(player_details['secure'] == '1')
|
||||
|
||||
# Get the transcode details
|
||||
if session.getElementsByTagName('TranscodeSession'):
|
||||
|
@@ -1,2 +1,2 @@
|
||||
PLEXPY_BRANCH = "beta"
|
||||
PLEXPY_RELEASE_VERSION = "v2.1.27-beta"
|
||||
PLEXPY_BRANCH = "master"
|
||||
PLEXPY_RELEASE_VERSION = "v2.1.28"
|
||||
|
Reference in New Issue
Block a user