diff --git a/plexapi/server.py b/plexapi/server.py index 4511f0a5..93e8ee0e 100644 --- a/plexapi/server.py +++ b/plexapi/server.py @@ -493,6 +493,15 @@ class PlexServer(PlexObject): self.refreshSynclist() 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): """ Contains the locally cached MyPlex account information. The properties provided don't