From 0689a760d869b525b15257e47d20ed6398f779e3 Mon Sep 17 00:00:00 2001 From: Blacktwin Date: Sun, 16 Jun 2019 01:36:05 -0400 Subject: [PATCH] clean tautulli section watched list --- reporting/watched_percentages.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reporting/watched_percentages.py b/reporting/watched_percentages.py index b65d673..670e191 100644 --- a/reporting/watched_percentages.py +++ b/reporting/watched_percentages.py @@ -333,7 +333,7 @@ if __name__ == '__main__': if all([tt_watched]): start += count for item in tt_watched: - section_watched_lst.append(item) + section_watched_lst.append(item["rating_key"]) continue elif not all([tt_watched]): break @@ -342,7 +342,7 @@ if __name__ == '__main__': except Exception as e: print(user, e) - section_watched_total = len(section_watched_lst) + section_watched_total = len(list(set(section_watched_lst))) percent_watched = 100 * (float(section_watched_total) / float(section_total)) print(" {} has watched {} items ({}%).".format(user, section_watched_total, int(percent_watched)))