mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Disable home platform stat while I figure out 2.6 compatibility.
This commit is contained in:
parent
112d5f0efa
commit
db492d8408
1 changed files with 6 additions and 4 deletions
|
@ -15,7 +15,7 @@
|
|||
|
||||
from plexpy import logger, helpers, request, datatables, config, db
|
||||
from xml.dom import minidom
|
||||
from collections import defaultdict, Counter
|
||||
# from collections import defaultdict, Counter
|
||||
|
||||
import plexpy
|
||||
import json
|
||||
|
@ -633,7 +633,7 @@ class PlexWatch(object):
|
|||
|
||||
home_stats.append({'stat_id': stat,
|
||||
'rows': top_users})
|
||||
|
||||
'''
|
||||
elif 'top_platforms' in stat:
|
||||
top_platform = []
|
||||
query = 'SELECT platform, COUNT(id) as total_plays, MAX(time) as last_watch, xml ' \
|
||||
|
@ -672,11 +672,12 @@ class PlexWatch(object):
|
|||
|
||||
home_stats.append({'stat_id': stat,
|
||||
'rows': top_platform_aggr})
|
||||
|
||||
'''
|
||||
return home_stats
|
||||
|
||||
# Taken from:
|
||||
# https://stackoverflow.com/questions/18066269/group-by-and-aggregate-the-values-of-a-list-of-dictionaries-in-python
|
||||
'''
|
||||
@staticmethod
|
||||
def group_and_sum_dataset(dataset, group_by_key, sum_value_keys, sort_by_key):
|
||||
|
||||
|
@ -693,4 +694,5 @@ class PlexWatch(object):
|
|||
]
|
||||
new_dataset.sort(key=lambda item: item[sort_by_key], reverse=True)
|
||||
|
||||
return new_dataset
|
||||
return new_dataset
|
||||
'''
|
Loading…
Add table
Add a link
Reference in a new issue