From 5d7ba8cf14358e75844c52f56e1f86f369aebdf0 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sun, 24 Apr 2016 22:07:16 -0700 Subject: [PATCH] Mask all info on the homepage --- data/interfaces/default/css/plexpy.css | 1 + data/interfaces/default/current_activity.html | 42 ++++++-- data/interfaces/default/home_stats.html | 18 +++- data/interfaces/default/images/art.png | Bin 0 -> 3303 bytes data/interfaces/default/index.html | 62 ++++++++--- plexpy/common.py | 1 + plexpy/datafactory.py | 38 ++++--- plexpy/helpers.py | 99 ++++++++++++++++-- plexpy/libraries.py | 4 +- plexpy/plextv.py | 2 +- plexpy/pmsconnect.py | 11 +- plexpy/users.py | 4 +- plexpy/webauth.py | 28 +++-- plexpy/webserve.py | 14 ++- 14 files changed, 251 insertions(+), 73 deletions(-) create mode 100644 data/interfaces/default/images/art.png diff --git a/data/interfaces/default/css/plexpy.css b/data/interfaces/default/css/plexpy.css index 72cc1f34..2b0690e0 100644 --- a/data/interfaces/default/css/plexpy.css +++ b/data/interfaces/default/css/plexpy.css @@ -884,6 +884,7 @@ a:hover .dashboard-activity-poster { float: right; } .dashboard-activity-metadata-user-thumb { + background-color: #282828; background-position: center; background-size: cover; margin-top: 5px; diff --git a/data/interfaces/default/current_activity.html b/data/interfaces/default/current_activity.html index 4d93b7f7..18601b60 100644 --- a/data/interfaces/default/current_activity.html +++ b/data/interfaces/default/current_activity.html @@ -68,20 +68,23 @@ DOCUMENTATION :: END % if data['stream_count'] != '0': % for a in data['sessions']:
- % if a['media_type'] == 'movie' or a['media_type'] == 'episode' or a['media_type'] == 'track': + % if (a['media_type'] == 'movie' or a['media_type'] == 'episode' or a['media_type'] == 'track') and a['rating_key']: + % else: + % endif
+ % if not a['art'].startswith('interfaces') or not a['thumb'].startswith('interfaces'): % if (a['media_type'] == 'movie' and not a['indexes']) or (a['indexes'] and not a['view_offset']): -
+
% elif (a['media_type'] == 'episode' and not a['indexes']) or (a['indexes'] and not a['view_offset']): -
+
% elif a['indexes']: - + % else: % if a['media_type'] == 'track': -
-
+
+
% elif a['media_type'] == 'clip': % if a['art'][:4] == 'http':
@@ -89,17 +92,20 @@ DOCUMENTATION :: END
% else: % if a['art']: -
+
% else: -
+
% endif % endif % elif a['media_type'] == 'photo': -
+
% else:
% endif % endif + % else: +
+ % endif
% endif
- % if a['media_type'] == 'movie' or a['media_type'] == 'episode' or a['media_type'] == 'track': + % if (a['media_type'] == 'movie' or a['media_type'] == 'episode' or a['media_type'] == 'track') and a['rating_key']: +
+ % else: % endif
@@ -222,9 +230,13 @@ DOCUMENTATION :: END
+ % if a['user_id']: + % else: + + % endif
diff --git a/data/interfaces/default/home_stats.html b/data/interfaces/default/home_stats.html index 8dc8bed8..aa0304c8 100644 --- a/data/interfaces/default/home_stats.html +++ b/data/interfaces/default/home_stats.html @@ -540,11 +540,13 @@ DOCUMENTATION :: END

% if top_stat['rows'][0]['user_id']: - % else: + % elif top_stat['rows'][0]['user']: % endif ${top_stat['rows'][0]['friendly_name']} + % if top_stat['rows'][0]['user_id'] or top_stat['rows'][0]['user']: + % endif

% if top_stat['stat_type'] == 'total_plays':

${top_stat['rows'][0]['total_plays']}

@@ -556,7 +558,7 @@ DOCUMENTATION :: END % if top_stat['rows'][0]['user_id']: - % else: + % elif top_stat['rows'][0]['user']: % endif % if top_stat['rows'][0]['user_thumb'] != '': @@ -568,7 +570,9 @@ DOCUMENTATION :: END
% endif + % if top_stat['rows'][0]['user_id'] or top_stat['rows'][0]['user']:
+ % endif % if len(top_stat['rows']) > 1: