Skip to content

Commit

Permalink
Merge branch 'media-folder-api' into erotemic
Browse files Browse the repository at this point in the history
  • Loading branch information
Erotemic committed Dec 17, 2023
2 parents a6a789d + 3acecae commit d404a1d
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions jellyfin_apiclient_python/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,32 @@ def users(self, handler="", action="GET", params=None, json=None):
else:
return self._get("Users/{UserId}%s" % handler, params)

def media_folders(self, handler="", params=None, json=None):
return self._get("Library/MediaFolders/", params)

def virtual_folders(self, handler="", action="GET", params=None, json=None):
if action == "POST":
return self._post("Library/VirtualFolders", json, params)
elif action == "DELETE":
return self._delete("Library/VirtualFolders", params)
else:
return self._get("Library/VirtualFolders", params)

def physical_paths(self, handler="", params=None, json=None):
return self._get("Library/PhysicalPaths/", params)

def folder_contents(self, abspath="/", params={}, json=None):
params['path'] = abspath
params['includeFiles'] = params.get('includeFiles', True)
params['includeDirectories'] = params.get('includeDirectories', True)
return self._get("Environment/DirectoryContents", params)

def refresh_library(self):
"""
Starts a library scan.
"""
return self._post("Library/Refresh")

def items(self, handler="", action="GET", params=None, json=None):
if action == "POST":
return self._post("Items%s" % handler, json, params)
Expand Down

0 comments on commit d404a1d

Please sign in to comment.