mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-10 22:24:12 +00:00
rename to outOut, handle http 204
This commit is contained in:
parent
a4443db64f
commit
e48462cd9f
1 changed files with 3 additions and 3 deletions
|
@ -145,7 +145,7 @@ class MyPlexAccount(PlexObject):
|
|||
allheaders = BASE_HEADERS.copy()
|
||||
allheaders.update(headers or {})
|
||||
response = method(url, headers=allheaders, timeout=timeout, **kwargs)
|
||||
if response.status_code not in (200, 201):
|
||||
if response.status_code not in (200, 201, 204):
|
||||
codename = codes.get(response.status_code)[0]
|
||||
errtext = response.text.replace('\n', ' ')
|
||||
log.warn('BadRequest (%s) %s %s; %s' % (response.status_code, codename, response.url, errtext))
|
||||
|
@ -361,7 +361,7 @@ class MyPlexAccount(PlexObject):
|
|||
self._webhooks = self.listAttrs(data, 'url', etag='webhook')
|
||||
return self._webhooks
|
||||
|
||||
def opt(self, playback=None, library=None):
|
||||
def optOut(self, playback=None, library=None):
|
||||
"""Opt in or out of sharing stuff with plex. See
|
||||
|
||||
https://www.plex.tv/about/privacy-legal/
|
||||
|
@ -375,7 +375,7 @@ class MyPlexAccount(PlexObject):
|
|||
|
||||
url = 'https://plex.tv/api/v2/user/privacy'
|
||||
|
||||
return self.query(url, method=self._session.put, **dict(params=params))
|
||||
return self.query(url, method=self._session.put, params=params)
|
||||
|
||||
|
||||
class MyPlexUser(PlexObject):
|
||||
|
|
Loading…
Reference in a new issue