update setPoster method in base, library.Collection, playlist

use media.Poster select method instead
This commit is contained in:
blacktwin 2020-03-18 09:26:09 -04:00
parent 8320359b5e
commit 0b4b9c452e
3 changed files with 3 additions and 9 deletions

View file

@ -446,9 +446,7 @@ class PlexPartialObject(PlexObject):
def setPoster(self, poster):
""" Set . :class:`~plexapi.media.Poster` to :class:`~plexapi.video.Video` """
key = poster._initpath[:-1]
data = '%s?url=%s' % (key, quote_plus(poster.ratingKey))
self._server.query(data, method=self._server._session.put)
poster.select()
# The photo tag cant be built atm. TODO
# def arts(self):

View file

@ -1087,9 +1087,7 @@ class Collections(PlexObject):
def setPoster(self, poster):
""" Set . :class:`~plexapi.media.Poster` to :class:`~plexapi.video.Video` """
key = poster._initpath[:-1]
data = '%s?url=%s' % (key, quote_plus(poster.ratingKey))
self._server.query(data, method=self._server._session.put)
poster.select()
# def edit(self, **kwargs):
# TODO

View file

@ -286,6 +286,4 @@ class Playlist(PlexPartialObject, Playable):
def setPoster(self, poster):
""" Set . :class:`~plexapi.media.Poster` to :class:`~plexapi.video.Video` """
key = poster._initpath[:-1]
data = '%s?url=%s' % (key, quote_plus(poster.ratingKey))
self._server.query(data, method=self._server._session.put)
poster.select()