mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 07:22:37 -07:00
Set checked value for notify by concurrent IP address
This commit is contained in:
parent
eb0b88bfcf
commit
cd3938eb33
2 changed files with 4 additions and 4 deletions
|
@ -110,8 +110,8 @@ class ActivityProcessor(object):
|
|||
# Check if any notification agents have notifications enabled
|
||||
if notify and any(d['on_concurrent'] for d in notifiers.available_notification_agents()):
|
||||
# Check if any concurrent streams by the user
|
||||
ip = True if plexpy.CONFIG.NOTIFY_CONCURRENT_BY_IP else None
|
||||
user_sessions = self.get_session_by_user_id(user_id=session['user_id'], ip_address=ip)
|
||||
user_sessions = self.get_session_by_user_id(user_id=session['user_id'],
|
||||
ip_address=plexpy.CONFIG.NOTIFY_CONCURRENT_BY_IP)
|
||||
if len(user_sessions) >= plexpy.CONFIG.NOTIFY_CONCURRENT_THRESHOLD:
|
||||
# Push any notifications - Push it on it's own thread so we don't hold up our db actions
|
||||
threading.Thread(target=notification_handler.notify,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue