mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-14 01:02:59 -07:00
remove total plays from library statistics
This commit is contained in:
parent
4e959be84d
commit
9fa72c64b8
2 changed files with 4 additions and 16 deletions
|
@ -19,7 +19,6 @@ thumb Returns the thumb of the library.
|
||||||
count Returns the number of top level items in the library.
|
count Returns the number of top level items in the library.
|
||||||
parent_count Returns the number of parent items in the library.
|
parent_count Returns the number of parent items in the library.
|
||||||
child_count Returns the number of child items in the library.
|
child_count Returns the number of child items in the library.
|
||||||
total_plays Returns the number of total plays of the library.
|
|
||||||
|
|
||||||
DOCUMENTATION :: END
|
DOCUMENTATION :: END
|
||||||
</%doc>
|
</%doc>
|
||||||
|
@ -29,9 +28,9 @@ DOCUMENTATION :: END
|
||||||
from plexpy.helpers import page
|
from plexpy.helpers import page
|
||||||
|
|
||||||
types = ('movie', 'show', 'artist', 'photo')
|
types = ('movie', 'show', 'artist', 'photo')
|
||||||
headers = {'movie': ('Movie Libraries', ('Movies', '', '', 'Total Plays')),
|
headers = {'movie': ('Movie Libraries', ('Movies', '', '')),
|
||||||
'show': ('TV Show Libraries', ('Shows', 'Seasons', 'Episodes', 'Total Plays')),
|
'show': ('TV Show Libraries', ('Shows', 'Seasons', 'Episodes')),
|
||||||
'artist': ('Music Libraries', ('Artists', 'Albums', 'Tracks', 'Total Plays')),
|
'artist': ('Music Libraries', ('Artists', 'Albums', 'Tracks')),
|
||||||
'photo': ('Photo Libraries', ('Albums', 'Photos', 'Videos'))}
|
'photo': ('Photo Libraries', ('Albums', 'Photos', 'Videos'))}
|
||||||
%>
|
%>
|
||||||
% for section_type in types:
|
% for section_type in types:
|
||||||
|
@ -81,12 +80,6 @@ DOCUMENTATION :: END
|
||||||
${section['grandchild_count']}
|
${section['grandchild_count']}
|
||||||
</div>
|
</div>
|
||||||
% endif
|
% endif
|
||||||
% if headers[section_type][1][3]:
|
|
||||||
<div class="sub-divider"> / </div>
|
|
||||||
<div class="sub-count">
|
|
||||||
${section['total_plays']}
|
|
||||||
</div>
|
|
||||||
% endif
|
|
||||||
</li>
|
</li>
|
||||||
% endfor
|
% endfor
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -950,11 +950,7 @@ class DataFactory(object):
|
||||||
logger.warn("Tautulli DataFactory :: Unable to execute database query for get_library_stats: %s." % e)
|
logger.warn("Tautulli DataFactory :: Unable to execute database query for get_library_stats: %s." % e)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
library_data = libraries.Libraries()
|
|
||||||
|
|
||||||
for item in result:
|
for item in result:
|
||||||
library_item = library_data.get_watch_time_stats(section_id=item['section_id'], grouping=None , query_days='0')
|
|
||||||
|
|
||||||
if item['custom_thumb'] and item['custom_thumb'] != item['library_thumb']:
|
if item['custom_thumb'] and item['custom_thumb'] != item['library_thumb']:
|
||||||
library_thumb = item['custom_thumb']
|
library_thumb = item['custom_thumb']
|
||||||
elif item['library_thumb']:
|
elif item['library_thumb']:
|
||||||
|
@ -974,8 +970,7 @@ class DataFactory(object):
|
||||||
'art': library_art,
|
'art': library_art,
|
||||||
'count': item['count'],
|
'count': item['count'],
|
||||||
'child_count': item['parent_count'],
|
'child_count': item['parent_count'],
|
||||||
'grandchild_count': item['child_count'],
|
'grandchild_count': item['child_count']
|
||||||
'total_plays': library_item[0]['total_plays']
|
|
||||||
}
|
}
|
||||||
library_stats.append(library)
|
library_stats.append(library)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue