Add limit 1 when retrieving library last play

This commit is contained in:
JonnyWong16 2021-03-15 14:01:23 -07:00
commit 7b920208a4
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -916,7 +916,8 @@ class DataFactory(object):
if not library_item or 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 continue
library_watched = library_data.get_recently_watched(section_id=item['section_id']) library_watched = library_data.get_recently_watched(section_id=item['section_id'],
limit='1')
last_play = library_watched[0]['time'] if library_watched else 0 last_play = library_watched[0]['time'] if library_watched else 0
if item['custom_thumb'] and item['custom_thumb'] != item['library_thumb']: if item['custom_thumb'] and item['custom_thumb'] != item['library_thumb']: