From c6ff8940b4295cc7a7b379e100fa46979bb45703 Mon Sep 17 00:00:00 2001 From: herby2212 Date: Fri, 22 Oct 2021 02:33:29 +0200 Subject: [PATCH] Add watch time and user stats to info pages (#1471) * watch time stats for show * watch time stats for movie * User Stats for movies and shows * implementation for missing media types * cleanup * no data + rescrict guest access implementation Co-authored-by: herby2212 --- data/interfaces/default/info.html | 50 +++++++++++ plexpy/datafactory.py | 142 ++++++++++++++++++++++++++++++ plexpy/webserve.py | 131 ++++++++++++++++++++++++++- 3 files changed, 322 insertions(+), 1 deletion(-) diff --git a/data/interfaces/default/info.html b/data/interfaces/default/info.html index a52d9cbb..eda30dee 100644 --- a/data/interfaces/default/info.html +++ b/data/interfaces/default/info.html @@ -539,6 +539,34 @@ DOCUMENTATION :: END % endif + % if data['media_type'] in ('movie', 'show', 'season', 'episode', 'artist', 'album', 'track'): +
+
+
+ Global Stats +
+
+
+
+
Loading data...
+
+
+
+
+
+
+
+ User Stats +
+
+
+
+
Loading data...
+
+
+
+
+ % endif <% history_type = data['media_type'] in ('movie', 'show', 'season', 'episode', 'artist', 'album', 'track') history_active = 'active' if history_type else '' @@ -894,6 +922,28 @@ DOCUMENTATION :: END }); % endif +% if data['media_type'] in ('movie', 'show', 'season', 'episode', 'artist', 'album', 'track'): + +% endif % if data['media_type'] == 'collection':