From 2459340c6f6b92fa2bfcb63cde6b2f93d791b7dc Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Mon, 18 Jan 2016 12:59:26 -0800 Subject: [PATCH] Fix user duplicated in Library user stats --- plexpy/libraries.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plexpy/libraries.py b/plexpy/libraries.py index 43f5ae2b..70235714 100644 --- a/plexpy/libraries.py +++ b/plexpy/libraries.py @@ -653,7 +653,7 @@ class Libraries(object): 'JOIN session_history_metadata ON session_history_metadata.id = session_history.id ' \ 'JOIN users ON users.user_id = session_history.user_id ' \ 'WHERE section_id = ? ' \ - 'GROUP BY user ' \ + 'GROUP BY users.user_id ' \ 'ORDER BY user_count DESC' result = monitor_db.select(query, args=[section_id]) else: @@ -834,4 +834,4 @@ class Libraries(object): else: return 'Unable to delete media info table cache, section_id not valid.' except Exception as e: - logger.warn(u"PlexPy Libraries :: Unable to delete media info table cache: %s." % e) \ No newline at end of file + logger.warn(u"PlexPy Libraries :: Unable to delete media info table cache: %s." % e)