mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-20 13:23:24 -07:00
Use custom library icons in library statistics
This commit is contained in:
parent
7e9e68ecd8
commit
877002961f
3 changed files with 17 additions and 7 deletions
|
@ -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']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue