Skip to content

Commit

Permalink
Adds support for setting collection names #56
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas committed Jan 5, 2025
1 parent 7f81b89 commit 7680bf4
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions plugins/jellyfin_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ def get_list(list_id, config=None):
'''Call jellyfin API
list_id should be a dict to pass to https://api.jellyfin.org/#tag/Items/operation/GetItems
'''

# If list name/desc have been manually specified - grab them
list_name = f"{list_id}"
list_desc = f"Movies which match the jellyfin API query: {list_id}"
if "list_name" in list_id:
list_name = list_id["list_name"]
del list_id["list_name"]
if "list_desc" in list_id:
list_name = list_id["list_desc"]
del list_id["list_desc"]

params = {
"enableTotalRecordCount": "false",
"enableImages": "false",
Expand All @@ -32,7 +43,7 @@ def get_list(list_id, config=None):
})

return {
"name": f"{list_id}",
"description": "Movies which match the jellyfin API query: {list_id}",
"name": list_name,
"description": list_desc,
"items": items
}

0 comments on commit 7680bf4

Please sign in to comment.