mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-20 13:23:24 -07:00
Add limit 1 when retrieving library last play
This commit is contained in:
parent
1e3905f47f
commit
7b920208a4
1 changed files with 2 additions and 1 deletions
|
@ -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']:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue