From b540d891db06246ca47f204d2e02721b8a8caaf4 Mon Sep 17 00:00:00 2001 From: herby2212 <12448284+herby2212@users.noreply.github.com> Date: Sat, 7 Oct 2023 21:37:49 +0200 Subject: [PATCH] made several changes mentioned in review --- data/interfaces/default/graphs.html | 3 ++- plexpy/graphs.py | 4 +--- plexpy/webserve.py | 3 ++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/data/interfaces/default/graphs.html b/data/interfaces/default/graphs.html index 52a4e0d6..8f16f59a 100644 --- a/data/interfaces/default/graphs.html +++ b/data/interfaces/default/graphs.html @@ -326,7 +326,8 @@ 'Live TV': '#19A0D7', 'Direct Play': '#E5A00D', 'Direct Stream': '#FFFFFF', - 'Transcode': '#F06464' + 'Transcode': '#F06464', + 'Max. Concurrent Streams': '#1014FC' }; var series_colors = []; $.each(data_series, function(index, series) { diff --git a/plexpy/graphs.py b/plexpy/graphs.py index 3dbf6102..82db9d82 100644 --- a/plexpy/graphs.py +++ b/plexpy/graphs.py @@ -22,7 +22,6 @@ from future.builtins import object import arrow import datetime -import itertools import plexpy if plexpy.PYTHON2: import common @@ -1265,12 +1264,11 @@ class Graphs(object): return output - def _make_user_cond(self, user_id, cond_prefix=None): + def _make_user_cond(self, user_id, cond_prefix='AND'): """ Expects user_id to be a comma-separated list of ints. """ user_cond = '' - cond_prefix = 'AND' if cond_prefix is None else cond_prefix if session.get_session_user_id() and user_id and user_id != str(session.get_session_user_id()): user_cond = cond_prefix + ' session_history.user_id = %s ' % session.get_session_user_id() diff --git a/plexpy/webserve.py b/plexpy/webserve.py index e7208c8c..196bbe5b 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -2571,7 +2571,8 @@ class WebInterface(object): "series": [{"name": "Direct Play", "data": [...]} {"name": "Direct Stream", "data": [...]}, - {"name": "Transcode", "data": [...]} + {"name": "Transcode", "data": [...]}, + {"name": "Max. Concurrent Streams", "data": [...]} ] } ```