mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 12:59:42 -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 plexpy import logger, helpers, request, datatables, config, db
|
||||||
from xml.dom import minidom
|
from xml.dom import minidom
|
||||||
from collections import defaultdict, Counter
|
# from collections import defaultdict, Counter
|
||||||
|
|
||||||
import plexpy
|
import plexpy
|
||||||
import json
|
import json
|
||||||
|
@ -633,7 +633,7 @@ class PlexWatch(object):
|
||||||
|
|
||||||
home_stats.append({'stat_id': stat,
|
home_stats.append({'stat_id': stat,
|
||||||
'rows': top_users})
|
'rows': top_users})
|
||||||
|
'''
|
||||||
elif 'top_platforms' in stat:
|
elif 'top_platforms' in stat:
|
||||||
top_platform = []
|
top_platform = []
|
||||||
query = 'SELECT platform, COUNT(id) as total_plays, MAX(time) as last_watch, xml ' \
|
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,
|
home_stats.append({'stat_id': stat,
|
||||||
'rows': top_platform_aggr})
|
'rows': top_platform_aggr})
|
||||||
|
'''
|
||||||
return home_stats
|
return home_stats
|
||||||
|
|
||||||
# Taken from:
|
# Taken from:
|
||||||
# https://stackoverflow.com/questions/18066269/group-by-and-aggregate-the-values-of-a-list-of-dictionaries-in-python
|
# https://stackoverflow.com/questions/18066269/group-by-and-aggregate-the-values-of-a-list-of-dictionaries-in-python
|
||||||
|
'''
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def group_and_sum_dataset(dataset, group_by_key, sum_value_keys, sort_by_key):
|
def group_and_sum_dataset(dataset, group_by_key, sum_value_keys, sort_by_key):
|
||||||
|
|
||||||
|
@ -694,3 +695,4 @@ class PlexWatch(object):
|
||||||
new_dataset.sort(key=lambda item: item[sort_by_key], reverse=True)
|
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