Skip to content

Commit df82654

Browse files
committed
Add ability to select, lock, and unlock logos
1 parent e8451cc commit df82654

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

plexapi/mixins.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -418,11 +418,11 @@ class LogoLockMixin:
418418

419419
def lockLogo(self):
420420
""" Lock the logo for a Plex object. """
421-
raise NotImplementedError('Logo cannot be locked through the API.')
421+
return self._edit(**{'clearLogo.locked': 1})
422422

423423
def unlockLogo(self):
424424
""" Unlock the logo for a Plex object. """
425-
raise NotImplementedError('Logo cannot be unlocked through the API.')
425+
return self._edit(**{'clearLogo.locked': 0})
426426

427427

428428
class LogoMixin(LogoUrlMixin, LogoLockMixin):
@@ -451,13 +451,13 @@ def uploadLogo(self, url=None, filepath=None):
451451
def setLogo(self, logo):
452452
""" Set the logo for a Plex object.
453453
454-
Raises:
455-
:exc:`~plexapi.exceptions.NotImplementedError`: Logo cannot be set through the API.
454+
Parameters:
455+
logo (:class:`~plexapi.media.Logo`): The logo object to select.
456456
"""
457-
raise NotImplementedError(
458-
'Logo cannot be set through the API. '
459-
'Re-upload the logo using "uploadLogo" to set it.'
460-
)
457+
logo.select()
458+
return self
459+
460+
def deleteLogo(self):
461461

462462

463463
class PosterUrlMixin:

0 commit comments

Comments
 (0)