mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 21:51:14 -07:00
fix music library fallback and update code style
This commit is contained in:
parent
4c47501687
commit
bd65e75cf4
3 changed files with 9 additions and 3 deletions
|
@ -812,7 +812,7 @@
|
|||
return (className.match (/(^|\s)platform-\S+/g) || []).join(' ');
|
||||
}).addClass('platform-' + $(elem).data('platform') + '-rgba');
|
||||
} else if (stat_id === 'top_libraries') {
|
||||
$('#stats-background-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', art, null, 500, 280, 40, '282828', 3, 'art') + ')');
|
||||
$('#stats-background-' + stat_id).css('background-image', 'url(' + page('pms_image_proxy', art, null, 500, 280, 40, '282828', 3, fallback_art) + ')');
|
||||
$('#stats-thumb-' + stat_id).removeClass(function (index, className) {
|
||||
return (className.match (/(^|\s)svg-icon library-\S+/g) || []).join(' ')});
|
||||
if (thumb.startsWith('http')) {
|
||||
|
|
|
@ -557,3 +557,4 @@ class Config(object):
|
|||
self.HOME_STATS_CARDS = home_stats_cards
|
||||
|
||||
self.CONFIG_VERSION = 18
|
||||
|
|
@ -909,6 +909,9 @@ class DataFactory(object):
|
|||
for item in result:
|
||||
library_item = library_data.get_watch_time_stats(section_id=item['section_id'], grouping=None , query_days=time_range)
|
||||
|
||||
if library_item[0]['total_plays'] == 0 and library_item[0]['total_time'] == 0:
|
||||
continue
|
||||
|
||||
if item['custom_thumb'] and item['custom_thumb'] != item['library_thumb']:
|
||||
library_thumb = item['custom_thumb']
|
||||
elif item['library_thumb']:
|
||||
|
@ -938,7 +941,9 @@ class DataFactory(object):
|
|||
'stat_id': stat,
|
||||
'stat_type': sort_type,
|
||||
'stat_title': 'Most Active Libraries',
|
||||
'rows': session.mask_session_info(sorted(top_libraries, key=lambda k: k[sort_type], reverse=True), mask_metadata=False)
|
||||
'rows': session.mask_session_info(
|
||||
sorted(top_libraries, key=lambda k: k[sort_type], reverse=True),
|
||||
mask_metadata=False)
|
||||
})
|
||||
|
||||
if stat_id and home_stats:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue