Skip to content

Commit e48462c

Browse files
committed
rename to outOut, handle http 204
1 parent a4443db commit e48462c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plexapi/myplex.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def query(self, url, method=None, headers=None, timeout=None, **kwargs):
145145
allheaders = BASE_HEADERS.copy()
146146
allheaders.update(headers or {})
147147
response = method(url, headers=allheaders, timeout=timeout, **kwargs)
148-
if response.status_code not in (200, 201):
148+
if response.status_code not in (200, 201, 204):
149149
codename = codes.get(response.status_code)[0]
150150
errtext = response.text.replace('\n', ' ')
151151
log.warn('BadRequest (%s) %s %s; %s' % (response.status_code, codename, response.url, errtext))
@@ -361,7 +361,7 @@ def webhooks(self):
361361
self._webhooks = self.listAttrs(data, 'url', etag='webhook')
362362
return self._webhooks
363363

364-
def opt(self, playback=None, library=None):
364+
def optOut(self, playback=None, library=None):
365365
"""Opt in or out of sharing stuff with plex. See
366366
367367
https://www.plex.tv/about/privacy-legal/
@@ -375,7 +375,7 @@ def opt(self, playback=None, library=None):
375375

376376
url = 'https://plex.tv/api/v2/user/privacy'
377377

378-
return self.query(url, method=self._session.put, **dict(params=params))
378+
return self.query(url, method=self._session.put, params=params)
379379

380380

381381
class MyPlexUser(PlexObject):

0 commit comments

Comments
 (0)