diff --git a/data/interfaces/default/css/plexpy.css b/data/interfaces/default/css/plexpy.css index 0a1b1ce4..40631fdc 100644 --- a/data/interfaces/default/css/plexpy.css +++ b/data/interfaces/default/css/plexpy.css @@ -1867,20 +1867,52 @@ a .library-user-instance-box:hover { margin: 0; } .home-platforms-instance { - background-color: #282828; position: relative; float: left; - width: 330px; - padding: 10px; + width: 340px; + padding: 5px; margin-right: 20px; margin-bottom: 20px; -webkit-box-sizing: content-box; box-sizing: content-box; - -webkit-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1); - -moz-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1); - box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1); white-space: nowrap; } +.home-platforms-instance-overlay { + height: 130px; + width: 100%; + padding: 5px; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + overflow: hidden; + -webkit-box-shadow: 0 0 4px rgba(0,0,0,.3), inset 0 0 0 1px rgba(255,255,255,.1); + -moz-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1); + box-shadow: 0 0 4px rgba(0,0,0,.3), inset 0 0 0 1px rgba(255,255,255,.1); + z-index: 0; +} +.home-platforms-instance-background { + background-color: #282828; + background-position: center; + background-size: cover; + height: 130px; + width: 100%; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + opacity: 0.15; + -webkit-filter: blur(3px); + -moz-filter: blur(3px); + filter: blur(3px); + -webkit-transition: background 1s linear; + transition: background 1s linear; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + z-index: -1; +} .home-platforms-instance li { position: relative; } @@ -2204,8 +2236,8 @@ a .library-user-instance-box:hover { } .home-platforms-instance-list-chevron { position: absolute; - top: 105px; - right: 0; + top: 100px; + right: 5px; cursor: pointer; } .home-platforms-instance-list-chevron i { @@ -2243,13 +2275,13 @@ a .home-platforms-list-cover-face:hover width: calc(100% + 20px); display: none; position: absolute; - top: 128px; - left: -10px; - -webkit-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1); + top: 124px; + left: -5px; + -webkit-box-shadow: 0 0 4px rgba(0,0,0,.3), inset 0 0 0 1px rgba(255,255,255,.1); -moz-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1); - box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1); + box-shadow: 0 0 4px rgba(0,0,0,.3), inset 0 0 0 1px rgba(255,255,255,.1); z-index: 1; - clip: rect(1px, 354px, 1000px, -2px); + clip: rect(1px, 350px, 1000px, -2px); } .history-table-title { text-overflow: ellipsis; diff --git a/data/interfaces/default/home_stats.html b/data/interfaces/default/home_stats.html index 2ee6b72a..88f75a53 100644 --- a/data/interfaces/default/home_stats.html +++ b/data/interfaces/default/home_stats.html @@ -75,6 +75,9 @@ DOCUMENTATION :: END % for top_stat in data: % if top_stat['stat_id'] == 'top_tv' and top_stat['rows']:
+
+
+
  • @@ -181,6 +184,9 @@ DOCUMENTATION :: END
    % elif top_stat['stat_id'] == 'popular_tv' and top_stat['rows']:
    +
    +
    +
  • @@ -279,6 +285,9 @@ DOCUMENTATION :: END
    % elif top_stat['stat_id'] == 'top_movies' and top_stat['rows']:
    +
    +
    +
  • @@ -385,6 +394,9 @@ DOCUMENTATION :: END
    % elif top_stat['stat_id'] == 'popular_movies' and top_stat['rows']:
    +
    +
    +
  • @@ -483,6 +495,9 @@ DOCUMENTATION :: END
    % elif top_stat['stat_id'] == 'top_music' and top_stat['rows']:
    +
    +
    +
  • @@ -589,6 +604,9 @@ DOCUMENTATION :: END
    % elif top_stat['stat_id'] == 'popular_music' and top_stat['rows']:
    +
    +
    +
  • @@ -687,6 +705,13 @@ DOCUMENTATION :: END
    % elif top_stat['stat_id'] == 'top_users' and top_stat['rows']:
    +
    + % if top_stat['rows'][0]['user_thumb'] != '': +
    + % else: +
    + % endif +
  • @@ -783,6 +808,12 @@ DOCUMENTATION :: END
    % elif top_stat['stat_id'] == 'top_platforms' and top_stat['rows']:
    +
    +
    + +
  • @@ -845,6 +876,9 @@ DOCUMENTATION :: END
    % elif top_stat['stat_id'] == 'last_watched' and top_stat['rows']:
    +
    +
    +
  • @@ -971,6 +1005,9 @@ DOCUMENTATION :: END
    % elif top_stat['stat_id'] == 'most_concurrent' and top_stat['rows']:
    +
    +
    +
  • diff --git a/data/interfaces/default/library_stats.html b/data/interfaces/default/library_stats.html index 80af7341..02f7066a 100644 --- a/data/interfaces/default/library_stats.html +++ b/data/interfaces/default/library_stats.html @@ -27,6 +27,9 @@ DOCUMENTATION :: END
      % for library in data:
      +
      +
      +
    • diff --git a/plexpy/datafactory.py b/plexpy/datafactory.py index 2fffe047..5642210c 100644 --- a/plexpy/datafactory.py +++ b/plexpy/datafactory.py @@ -285,7 +285,7 @@ class DataFactory(object): top_tv = [] try: query = 'SELECT t.id, t.grandparent_title, t.grandparent_rating_key, t.grandparent_thumb, t.section_id, ' \ - 't.media_type, t.content_rating, t.labels, t.started, ' \ + 't.art, t.media_type, t.content_rating, t.labels, t.started, ' \ 'MAX(t.started) AS last_watch, COUNT(t.id) AS total_plays, SUM(t.d) AS total_duration ' \ 'FROM (SELECT *, SUM(CASE WHEN stopped > 0 THEN (stopped - started) - ' \ ' (CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) ELSE 0 END) ' \ @@ -313,6 +313,7 @@ class DataFactory(object): 'last_play': item['last_watch'], 'grandparent_thumb': item['grandparent_thumb'], 'thumb': '', + 'art': item['art'], 'section_id': item['section_id'], 'media_type': item['media_type'], 'content_rating': item['content_rating'], @@ -333,7 +334,7 @@ class DataFactory(object): popular_tv = [] try: query = 'SELECT t.id, t.grandparent_title, t.grandparent_rating_key, t.grandparent_thumb, t.section_id, ' \ - 't.media_type, t.content_rating, t.labels, t.started, ' \ + 't.art, t.media_type, t.content_rating, t.labels, t.started, ' \ 'COUNT(DISTINCT t.user_id) AS users_watched, ' \ 'MAX(t.started) AS last_watch, COUNT(t.id) as total_plays, SUM(t.d) AS total_duration ' \ 'FROM (SELECT *, SUM(CASE WHEN stopped > 0 THEN (stopped - started) - ' \ @@ -361,6 +362,7 @@ class DataFactory(object): 'total_plays': item['total_plays'], 'grandparent_thumb': item['grandparent_thumb'], 'thumb': '', + 'art': item['art'], 'section_id': item['section_id'], 'media_type': item['media_type'], 'content_rating': item['content_rating'], @@ -380,7 +382,7 @@ class DataFactory(object): top_movies = [] try: query = 'SELECT t.id, t.full_title, t.rating_key, t.thumb, t.section_id, ' \ - 't.media_type, t.content_rating, t.labels, t.started, ' \ + 't.art, t.media_type, t.content_rating, t.labels, t.started, ' \ 'MAX(t.started) AS last_watch, COUNT(t.id) AS total_plays, SUM(t.d) AS total_duration ' \ 'FROM (SELECT *, SUM(CASE WHEN stopped > 0 THEN (stopped - started) - ' \ ' (CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) ELSE 0 END) ' \ @@ -408,6 +410,7 @@ class DataFactory(object): 'last_play': item['last_watch'], 'grandparent_thumb': '', 'thumb': item['thumb'], + 'art': item['art'], 'section_id': item['section_id'], 'media_type': item['media_type'], 'content_rating': item['content_rating'], @@ -428,7 +431,7 @@ class DataFactory(object): popular_movies = [] try: query = 'SELECT t.id, t.full_title, t.rating_key, t.thumb, t.section_id, ' \ - 't.media_type, t.content_rating, t.labels, t.started, ' \ + 't.art, t.media_type, t.content_rating, t.labels, t.started, ' \ 'COUNT(DISTINCT t.user_id) AS users_watched, ' \ 'MAX(t.started) AS last_watch, COUNT(t.id) as total_plays, SUM(t.d) AS total_duration ' \ 'FROM (SELECT *, SUM(CASE WHEN stopped > 0 THEN (stopped - started) - ' \ @@ -456,6 +459,7 @@ class DataFactory(object): 'total_plays': item['total_plays'], 'grandparent_thumb': '', 'thumb': item['thumb'], + 'art': item['art'], 'section_id': item['section_id'], 'media_type': item['media_type'], 'content_rating': item['content_rating'], @@ -475,7 +479,7 @@ class DataFactory(object): top_music = [] try: query = 'SELECT t.id, t.grandparent_title, t.grandparent_rating_key, t.grandparent_thumb, t.section_id, ' \ - 't.media_type, t.content_rating, t.labels, t.started, ' \ + 't.art, t.media_type, t.content_rating, t.labels, t.started, ' \ 'MAX(t.started) AS last_watch, COUNT(t.id) AS total_plays, SUM(t.d) AS total_duration ' \ 'FROM (SELECT *, SUM(CASE WHEN stopped > 0 THEN (stopped - started) - ' \ ' (CASE WHEN paused_counter IS NULL THEN 0 ELSE paused_counter END) ELSE 0 END) ' \ @@ -503,6 +507,7 @@ class DataFactory(object): 'last_play': item['last_watch'], 'grandparent_thumb': item['grandparent_thumb'], 'thumb': '', + 'art': item['art'], 'section_id': item['section_id'], 'media_type': item['media_type'], 'content_rating': item['content_rating'], @@ -523,7 +528,7 @@ class DataFactory(object): popular_music = [] try: query = 'SELECT t.id, t.grandparent_title, t.grandparent_rating_key, t.grandparent_thumb, t.section_id, ' \ - 't.media_type, t.content_rating, t.labels, t.started, ' \ + 't.art, t.media_type, t.content_rating, t.labels, t.started, ' \ 'COUNT(DISTINCT t.user_id) AS users_watched, ' \ 'MAX(t.started) AS last_watch, COUNT(t.id) as total_plays, SUM(t.d) AS total_duration ' \ 'FROM (SELECT *, SUM(CASE WHEN stopped > 0 THEN (stopped - started) - ' \ @@ -551,6 +556,7 @@ class DataFactory(object): 'total_plays': item['total_plays'], 'grandparent_thumb': item['grandparent_thumb'], 'thumb': '', + 'art': item['art'], 'section_id': item['section_id'], 'media_type': item['media_type'], 'content_rating': item['content_rating'], @@ -670,7 +676,7 @@ class DataFactory(object): try: query = 'SELECT t.id, t.full_title, t.rating_key, t.thumb, t.grandparent_thumb, ' \ 't.user, t.user_id, t.custom_avatar_url as user_thumb, t.player, t.section_id, ' \ - 't.media_type, t.content_rating, t.labels, ' \ + 't.art, t.media_type, t.content_rating, t.labels, ' \ '(CASE WHEN t.friendly_name IS NULL THEN t.username ELSE t.friendly_name END) ' \ ' AS friendly_name, ' \ 'MAX(t.started) AS last_watch, ' \ @@ -710,6 +716,7 @@ class DataFactory(object): 'rating_key': item['rating_key'], 'thumb': thumb, 'grandparent_thumb': item['grandparent_thumb'], + 'art': item['art'], 'section_id': item['section_id'], 'media_type': item['media_type'], 'content_rating': item['content_rating'], @@ -816,7 +823,7 @@ class DataFactory(object): if id.isdigit(): try: query = 'SELECT section_id, section_name, section_type, thumb AS library_thumb, ' \ - 'custom_thumb_url AS custom_thumb, count, parent_count, child_count ' \ + 'custom_thumb_url AS custom_thumb, art, count, parent_count, child_count ' \ 'FROM library_sections ' \ 'WHERE section_id = %s ' % id result = monitor_db.select(query) @@ -836,6 +843,7 @@ class DataFactory(object): 'section_name': item['section_name'], 'section_type': item['section_type'], 'thumb': library_thumb, + 'art': item['art'], 'count': item['count'], 'parent_count': item['parent_count'], 'child_count': item['child_count'] diff --git a/plexpy/notifiers.py b/plexpy/notifiers.py index 03bec1f8..56722909 100644 --- a/plexpy/notifiers.py +++ b/plexpy/notifiers.py @@ -36,7 +36,7 @@ try: from Cryptodome.Protocol.KDF import PBKDF2 from Cryptodome.Cipher import AES from Cryptodome.Random import get_random_bytes - from Cryptodome.Hash import HMAC, SHA1 + from Cryptodome.Hash import HMAC, SHA256 CRYPTODOME = True except ImportError: try: @@ -785,7 +785,7 @@ class ANDROIDAPP(Notifier): key_length = 32 # AES256 iterations = 1000 key = PBKDF2(passphrase, salt, dkLen=key_length, count=iterations, - prf=lambda p, s: HMAC.new(p, s, SHA1).digest()) + prf=lambda p, s: HMAC.new(p, s, SHA256).digest()) #logger.debug("Encryption key (base64): {}".format(base64.b64encode(key)))