Fix if library watch time stats are blocked for guest access

This commit is contained in:
JonnyWong16 2021-03-15 12:01:41 -07:00
parent 2949fd4079
commit e25c18bb20
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# This file is part of Tautulli.
#
@ -909,7 +909,7 @@ class DataFactory(object):
for item in result:
library_item = library_data.get_watch_time_stats(section_id=item['section_id'], grouping=None , query_days=time_range)
if library_item[0]['total_plays'] == 0 and library_item[0]['total_time'] == 0:
if not library_item or library_item[0]['total_plays'] == 0 and library_item[0]['total_time'] == 0:
continue
if item['custom_thumb'] and item['custom_thumb'] != item['library_thumb']: