mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Change home stats type to 'plays' or 'duration'
This commit is contained in:
parent
e36be32b8e
commit
d93390f8ed
3 changed files with 12 additions and 6 deletions
|
@ -261,7 +261,7 @@ class DataFactory(object):
|
|||
|
||||
return dict
|
||||
|
||||
def get_home_stats(self, grouping=None, time_range=None, stats_type=None, stats_count=None, stats_cards=None):
|
||||
def get_home_stats(self, grouping=None, time_range=30, stats_type='plays', stats_count=10, stats_cards=None):
|
||||
monitor_db = database.MonitorDatabase()
|
||||
|
||||
if grouping is None:
|
||||
|
@ -280,7 +280,7 @@ class DataFactory(object):
|
|||
music_watched_percent = plexpy.CONFIG.MUSIC_WATCHED_PERCENT
|
||||
|
||||
group_by = 'session_history.reference_id' if grouping else 'session_history.id'
|
||||
sort_type = 'total_duration' if helpers.cast_to_int(stats_type) == 1 else 'total_plays'
|
||||
sort_type = 'total_duration' if stats_type == 'duration' else 'total_plays'
|
||||
|
||||
home_stats = []
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue