From 59fcdb4080c6acb675db6ee06ae2265fae099aa3 Mon Sep 17 00:00:00 2001 From: blacktwin Date: Tue, 9 Jun 2020 23:32:22 -0400 Subject: [PATCH] add defaultAdvanced method to library.LibrarySection --- plexapi/library.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plexapi/library.py b/plexapi/library.py index c562084d..bf1c85ab 100644 --- a/plexapi/library.py +++ b/plexapi/library.py @@ -491,6 +491,15 @@ class LibrarySection(PlexObject): self.edit(**data) + def defaultAdvanced(self): + """ Edit all of library's advanced settings to default. """ + data = {} + key = 'prefs[%s]' + for setting in self.settings(): + data[key % setting.id] = setting.default + + self.edit(**data) + def onDeck(self): """ Returns a list of media items on deck from this library section. """ key = '/library/sections/%s/onDeck' % self.key