diff --git a/data/interfaces/default/css/plexpy.css b/data/interfaces/default/css/plexpy.css index ad0a0c8d..6c683f76 100644 --- a/data/interfaces/default/css/plexpy.css +++ b/data/interfaces/default/css/plexpy.css @@ -501,7 +501,8 @@ textarea.form-control:focus { .libraries-poster-face { overflow: hidden; float: left; - background-size: contain; + background-size: cover; + background-position: center; height: 40px; width: 40px; /*-webkit-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1); @@ -1717,7 +1718,8 @@ a:hover .item-children-poster { float: left; margin-top: 15px; margin-right: 15px; - background-size: contain; + background-size: cover; + background-position: center; height: 80px; width: 80px; /*-webkit-box-shadow: 0 0 4px rgba(0,0,0,.3),inset 0 0 0 1px rgba(255,255,255,.1); diff --git a/data/interfaces/default/library_stats.html b/data/interfaces/default/library_stats.html index 048d5e6f..80af7341 100644 --- a/data/interfaces/default/library_stats.html +++ b/data/interfaces/default/library_stats.html @@ -75,13 +75,13 @@ DOCUMENTATION :: END % endif - % if library['thumb']: + % if library['thumb'].startswith("http"):
-
+
% else:
-
+
% endif diff --git a/plexpy/datafactory.py b/plexpy/datafactory.py index 3be50b84..d4bb7111 100644 --- a/plexpy/datafactory.py +++ b/plexpy/datafactory.py @@ -664,7 +664,8 @@ class DataFactory(object): for id in library_cards: if id.isdigit(): try: - query = 'SELECT section_id, section_name, section_type, thumb, count, parent_count, child_count ' \ + query = 'SELECT section_id, section_name, section_type, thumb AS library_thumb, ' \ + 'custom_thumb_url AS custom_thumb, count, parent_count, child_count ' \ 'FROM library_sections ' \ 'WHERE section_id = %s ' % id result = monitor_db.select(query) @@ -673,10 +674,17 @@ class DataFactory(object): return None for item in result: + if item['custom_thumb'] and item['custom_thumb'] != item['library_thumb']: + library_thumb = item['custom_thumb'] + elif item['library_thumb']: + library_thumb = item['library_thumb'] + else: + library_thumb = common.DEFAULT_COVER_THUMB + library = {'section_id': item['section_id'], 'section_name': item['section_name'], 'section_type': item['section_type'], - 'thumb': item['thumb'], + 'thumb': library_thumb, 'count': item['count'], 'parent_count': item['parent_count'], 'child_count': item['child_count']