Disable home platform stat while I figure out 2.6 compatibility.

This commit is contained in:
Tim 2015-06-22 00:00:08 +02:00
commit db492d8408

View file

@ -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
'''