mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-10 06:04:15 +00:00
create _allowMediaDeletion method in server.py
This commit is contained in:
parent
c3e16b2d36
commit
ba75935e0b
1 changed files with 9 additions and 0 deletions
|
@ -493,6 +493,15 @@ class PlexServer(PlexObject):
|
||||||
self.refreshSynclist()
|
self.refreshSynclist()
|
||||||
self.refreshContent()
|
self.refreshContent()
|
||||||
|
|
||||||
|
def _allowMediaDeletion(self, toggle):
|
||||||
|
""" Toggle allowMediaDeletion.
|
||||||
|
Parameters:
|
||||||
|
toggle (bool): True enables Media Deletion
|
||||||
|
False or None disable Media Deletion
|
||||||
|
"""
|
||||||
|
value = 1 if toggle is True else 0
|
||||||
|
return self.query('/:/prefs?allowMediaDeletion=%s' % value, self._session.put)
|
||||||
|
|
||||||
|
|
||||||
class Account(PlexObject):
|
class Account(PlexObject):
|
||||||
""" Contains the locally cached MyPlex account information. The properties provided don't
|
""" Contains the locally cached MyPlex account information. The properties provided don't
|
||||||
|
|
Loading…
Reference in a new issue