mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-12-13 02:23:18 +00:00
Add maximum days in next episodes configuration
This commit is contained in:
parent
c43f09e502
commit
18c4124afa
5 changed files with 30 additions and 3 deletions
|
|
@ -920,8 +920,21 @@ def get_next_episodes(item_id, limit):
|
|||
if not library:
|
||||
return
|
||||
|
||||
result = JSONRPC("VideoLibrary.GetTVShows").execute(
|
||||
{
|
||||
maxDaysInNextEpisodes = settings('maxDaysInNextEpisodes')
|
||||
if maxDaysInNextEpisodes != 0:
|
||||
params = {
|
||||
"sort": {"order": "descending", "method": "lastplayed"},
|
||||
"filter": {
|
||||
"and": [
|
||||
{"operator": "true", "field": "inprogress", "value": ""},
|
||||
{"operator": "is", "field": "tag", "value": "%s" % library},
|
||||
{"operator": "inthelast", "field": "lastplayed", "value": "%s days" % maxDaysInNextEpisodes},
|
||||
]
|
||||
},
|
||||
"properties": ["title", "studio", "mpaa", "file", "art"],
|
||||
}
|
||||
else:
|
||||
params = {
|
||||
"sort": {"order": "descending", "method": "lastplayed"},
|
||||
"filter": {
|
||||
"and": [
|
||||
|
|
@ -931,7 +944,8 @@ def get_next_episodes(item_id, limit):
|
|||
},
|
||||
"properties": ["title", "studio", "mpaa", "file", "art"],
|
||||
}
|
||||
)
|
||||
|
||||
result = JSONRPC("VideoLibrary.GetTVShows").execute(params)
|
||||
|
||||
try:
|
||||
items = result["result"]["tvshows"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue