Skip to content

Commit

Permalink
Remove broken get_log_file function
Browse files Browse the repository at this point in the history
  • Loading branch information
Erotemic committed Sep 12, 2024
1 parent 2ff3751 commit 059d078
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions jellyfin_apiclient_python/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,33 +600,6 @@ def get_log_entries(self, startIndex=None, limit=None, minDate=None, hasUserId=N
params['hasUserId'] = hasUserId
return self._get("System/ActivityLog/Entries", params=params)

def get_log_file(self, name=None):
"""
Args:
name (str | None):
The name of one of the logfiles returned by
`:func:get_server_logs`. If unspecified, the most
recently modified log will be returned.
Returns:
...
References:
.. [GetLogFile] https://api.jellyfin.org/#tag/System/operation/GetLogFile
"""
if name is None:
infos = self.get_server_logs()
if len(infos) == 0:
raise Exception('No system logs are available')
infos = sorted(infos, key=lambda d: d['DateModified'])
name = infos[-1]['Name']
result = self._get("System/Logs/Log", params={'name': name})
if result is None:
raise AssertionError(
('FIXME: Result should not be none, but that seems to always '
'be the case. Is this endpoint broken?'))
return result

def post_capabilities(self, data):
return self.sessions("/Capabilities/Full", "POST", json=data)

Expand Down

0 comments on commit 059d078

Please sign in to comment.