Skip to content

Commit 7dd0d75

Browse files
committed
Raise NotImplementedError for delete theme
1 parent 2b7de89 commit 7dd0d75

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

plexapi/mixins.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -597,10 +597,14 @@ def setTheme(self, theme):
597597
)
598598

599599
def deleteTheme(self):
600-
""" Delete the theme from a Plex object. """
601-
key = f'/library/metadata/{self.ratingKey}/themes'
602-
self._server.query(key, method=self._server._session.delete)
603-
return self
600+
""" Delete the theme from a Plex object.
601+
602+
Raises:
603+
:exc:`~plexapi.exceptions.NotImplementedError`: Themes cannot be deleted through the API.
604+
"""
605+
raise NotImplementedError(
606+
'Themes cannot be deleted through the API.'
607+
)
604608

605609

606610
class EditFieldMixin:

0 commit comments

Comments
 (0)