mirror of
https://github.com/pkkid/python-plexapi
synced 2025-02-16 21:08:27 +00:00
update setPoster method in base, library.Collection, playlist
use media.Poster select method instead
This commit is contained in:
parent
8320359b5e
commit
0b4b9c452e
3 changed files with 3 additions and 9 deletions
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
Loading…
Add table
Reference in a new issue