Skip to content

Commit

Permalink
Remove unused params, avoid mutating params
Browse files Browse the repository at this point in the history
  • Loading branch information
Erotemic committed Jan 21, 2024
1 parent 23d75ab commit 6219186
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions jellyfin_apiclient_python/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,21 +118,22 @@ 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):
def media_folders(self, params=None):
return self._get("Library/MediaFolders/", params)

def virtual_folders(self, handler="", action="GET", params=None, json=None):
def virtual_folders(self, 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):
def physical_paths(self, params=None):
return self._get("Library/PhysicalPaths/", params)

def folder_contents(self, abspath="/", params={}, json=None):
def folder_contents(self, abspath="/", params=None, json=None):
params = {} if params is None else params.copy()
params['path'] = abspath
params['includeFiles'] = params.get('includeFiles', True)
params['includeDirectories'] = params.get('includeDirectories', True)
Expand Down

0 comments on commit 6219186

Please sign in to comment.