Refactor to meet code style

This commit is contained in:
mate.kavalecz 2025-05-04 02:28:58 +02:00
parent 18c4124afa
commit 937aff24f3

View file

@ -920,15 +920,15 @@ def get_next_episodes(item_id, limit):
if not library: if not library:
return return
maxDaysInNextEpisodes = settings('maxDaysInNextEpisodes') max_days = settings('maxDaysInNextEpisodes')
if maxDaysInNextEpisodes != 0: if max_days != 0:
params = { params = {
"sort": {"order": "descending", "method": "lastplayed"}, "sort": {"order": "descending", "method": "lastplayed"},
"filter": { "filter": {
"and": [ "and": [
{"operator": "true", "field": "inprogress", "value": ""}, {"operator": "true", "field": "inprogress", "value": ""},
{"operator": "is", "field": "tag", "value": "%s" % library}, {"operator": "is", "field": "tag", "value": "%s" % library},
{"operator": "inthelast", "field": "lastplayed", "value": "%s days" % maxDaysInNextEpisodes}, {"operator": "inthelast", "field": "lastplayed", "value": "%s days" % max_days},
] ]
}, },
"properties": ["title", "studio", "mpaa", "file", "art"], "properties": ["title", "studio", "mpaa", "file", "art"],