mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Merge branch 'nightly' into v2-newsletter
This commit is contained in:
commit
d3f6812178
8 changed files with 40 additions and 37 deletions
|
@ -1,5 +1,12 @@
|
|||
# Changelog
|
||||
|
||||
## v2.0.25 (2018-03-22)
|
||||
|
||||
* Monitoring:
|
||||
* Fix: Websocket not reconnecting causing activity monitoring and notifications to not work.
|
||||
* Fix: Error checking for synced streams without Plex Pass.
|
||||
|
||||
|
||||
## v2.0.24 (2018-03-18)
|
||||
|
||||
* Monitoring:
|
||||
|
|
|
@ -136,9 +136,6 @@ div.form-control .selectize-input {
|
|||
text-transform: uppercase;
|
||||
font-size: 10px;
|
||||
}
|
||||
.react-selectize.root-node .react-selectize-control .react-selectize-search-field-and-selected-values.negative-operator .value-wrapper:not(:first-child):before {
|
||||
content: "and" !important;
|
||||
}
|
||||
.react-selectize.root-node .react-selectize-control .react-selectize-search-field-and-selected-values .resizable-input {
|
||||
padding-top: 3px !important;
|
||||
padding-bottom: 3px !important;
|
||||
|
|
|
@ -338,21 +338,6 @@
|
|||
}
|
||||
});
|
||||
|
||||
function setNegativeOperator(select) {
|
||||
if (select.val() === 'does not contain' || select.val() === 'is not') {
|
||||
select.closest('.form-group').find('.react-selectize-search-field-and-selected-values').addClass('negative-operator');
|
||||
} else {
|
||||
select.closest('.form-group').find('.react-selectize-search-field-and-selected-values').removeClass('negative-operator');
|
||||
}
|
||||
}
|
||||
|
||||
$('#condition-widget select[name=operator]').each(function () {
|
||||
setNegativeOperator($(this));
|
||||
});
|
||||
$('#condition-widget').on('change', 'select[name=operator]', function () {
|
||||
setNegativeOperator($(this));
|
||||
});
|
||||
|
||||
function reloadModal() {
|
||||
$.ajax({
|
||||
url: 'get_notifier_config_modal',
|
||||
|
|
|
@ -1625,13 +1625,16 @@ def dbcheck():
|
|||
)
|
||||
|
||||
# Rename notifiers in the database
|
||||
logger.debug(u"Altering database. Renaming notifiers.")
|
||||
c_db.execute(
|
||||
'UPDATE notifiers SET agent_label = "Kodi" WHERE agent_label = "XBMC"'
|
||||
)
|
||||
c_db.execute(
|
||||
'UPDATE notifiers SET agent_label = "macOS Notification Center" WHERE agent_label = "OSX Notify"'
|
||||
)
|
||||
result = c_db.execute('SELECT agent_label FROM notifiers '
|
||||
'WHERE agent_label = "XBMC" OR agent_label = "OSX Notify"').fetchone()
|
||||
if result:
|
||||
logger.debug(u"Altering database. Renaming notifiers.")
|
||||
c_db.execute(
|
||||
'UPDATE notifiers SET agent_label = "Kodi" WHERE agent_label = "XBMC"'
|
||||
)
|
||||
c_db.execute(
|
||||
'UPDATE notifiers SET agent_label = "macOS Notification Center" WHERE agent_label = "OSX Notify"'
|
||||
)
|
||||
|
||||
# Add "Local" user to database as default unauthenticated user.
|
||||
result = c_db.execute('SELECT id FROM users WHERE username = "Local"')
|
||||
|
|
|
@ -293,8 +293,8 @@ def connect_server(log=True, startup=False):
|
|||
|
||||
try:
|
||||
web_socket.start_thread()
|
||||
except:
|
||||
logger.error(u"Websocket :: Unable to open connection.")
|
||||
except Exception as e:
|
||||
logger.error(u"Websocket :: Unable to open connection: %s." % e)
|
||||
|
||||
|
||||
def check_server_access():
|
||||
|
|
|
@ -1512,7 +1512,8 @@ class PmsConnect(object):
|
|||
if media_type not in ('photo', 'clip') \
|
||||
and not session.getElementsByTagName('Session') \
|
||||
and not session.getElementsByTagName('TranscodeSession') \
|
||||
and helpers.get_xml_attr(session, 'ratingKey').isdigit():
|
||||
and helpers.get_xml_attr(session, 'ratingKey').isdigit() \
|
||||
and plexpy.CONFIG.PMS_PLEXPASS:
|
||||
plex_tv = plextv.PlexTV()
|
||||
parent_rating_key = helpers.get_xml_attr(session, 'parentRatingKey')
|
||||
grandparent_rating_key = helpers.get_xml_attr(session, 'grandparentRatingKey')
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
PLEXPY_BRANCH = "master"
|
||||
PLEXPY_RELEASE_VERSION = "v2.0.24"
|
||||
PLEXPY_RELEASE_VERSION = "v2.0.25"
|
||||
|
|
|
@ -25,6 +25,7 @@ import plexpy
|
|||
import activity_handler
|
||||
import activity_pinger
|
||||
import activity_processor
|
||||
import database
|
||||
import logger
|
||||
|
||||
name = 'websocket'
|
||||
|
@ -33,8 +34,14 @@ ws_shutdown = False
|
|||
|
||||
|
||||
def start_thread():
|
||||
# Check for any existing sessions on start up
|
||||
activity_pinger.check_active_sessions(ws_request=True)
|
||||
try:
|
||||
# Check for any existing sessions on start up
|
||||
activity_pinger.check_active_sessions(ws_request=True)
|
||||
except Exception as e:
|
||||
logger.error(u"Tautulli WebSocket :: Failed to check for active sessions: %s." % e)
|
||||
logger.warn(u"Tautulli WebSocket :: Attempt to fix by flushing temporary sessions...")
|
||||
database.delete_sessions()
|
||||
|
||||
# Start the websocket listener on it's own thread
|
||||
thread = threading.Thread(target=run)
|
||||
thread.daemon = True
|
||||
|
@ -67,7 +74,7 @@ def on_disconnect():
|
|||
|
||||
|
||||
def reconnect():
|
||||
shutdown()
|
||||
close()
|
||||
logger.info(u"Tautulli WebSocket :: Reconnecting websocket...")
|
||||
start_thread()
|
||||
|
||||
|
@ -75,7 +82,10 @@ def reconnect():
|
|||
def shutdown():
|
||||
global ws_shutdown
|
||||
ws_shutdown = True
|
||||
close()
|
||||
|
||||
|
||||
def close():
|
||||
logger.info(u"Tautulli WebSocket :: Disconnecting websocket...")
|
||||
plexpy.WEBSOCKET.close()
|
||||
plexpy.WS_CONNECTED = False
|
||||
|
@ -122,7 +132,7 @@ def run():
|
|||
logger.info(u"Tautulli WebSocket :: Ready")
|
||||
plexpy.WS_CONNECTED = True
|
||||
except (websocket.WebSocketException, IOError, Exception) as e:
|
||||
logger.error(u"Tautulli WebSocket :: %s." % e)
|
||||
logger.error("Tautulli WebSocket :: %s." % e)
|
||||
|
||||
if plexpy.WS_CONNECTED:
|
||||
on_connect()
|
||||
|
@ -155,18 +165,18 @@ def run():
|
|||
logger.info(u"Tautulli WebSocket :: Ready")
|
||||
plexpy.WS_CONNECTED = True
|
||||
except (websocket.WebSocketException, IOError, Exception) as e:
|
||||
logger.error(u"Tautulli WebSocket :: %s." % e)
|
||||
logger.error("Tautulli WebSocket :: %s." % e)
|
||||
|
||||
else:
|
||||
shutdown()
|
||||
close()
|
||||
break
|
||||
|
||||
except (websocket.WebSocketException, Exception) as e:
|
||||
if ws_shutdown:
|
||||
break
|
||||
|
||||
logger.error(u"Tautulli WebSocket :: %s." % e)
|
||||
shutdown()
|
||||
logger.error("Tautulli WebSocket :: %s." % e)
|
||||
close()
|
||||
break
|
||||
|
||||
if not plexpy.WS_CONNECTED and not ws_shutdown:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue