From 0c6ccc5d525b3f01b1989967f86f68b53862b113 Mon Sep 17 00:00:00 2001 From: Tim Date: Sat, 19 Sep 2015 13:10:03 +0200 Subject: [PATCH] Fix bug on stats type where it would always show home stats by duration. --- plexpy/datafactory.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plexpy/datafactory.py b/plexpy/datafactory.py index 52d21e42..40e57092 100644 --- a/plexpy/datafactory.py +++ b/plexpy/datafactory.py @@ -131,10 +131,10 @@ class DataFactory(object): return dict - def get_home_stats(self, time_range='30', stats_type='0', stats_count='5', stats_cards='', notify_watched_percent='85'): + def get_home_stats(self, time_range='30', stats_type=0, stats_count='5', stats_cards='', notify_watched_percent='85'): monitor_db = database.MonitorDatabase() - sort_type = 'total_plays' if stats_type == '0' else 'total_duration' + sort_type = 'total_plays' if stats_type == 0 else 'total_duration' home_stats = []