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)