Skip to content

Commit 6ce9917

Browse files
committed
adding setPoster in Video class instead of or in combination to Poster class
1 parent 06ae469 commit 6ce9917

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plexapi/video.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ def uploadPoster(self, url=None, filepath=None):
136136
data = open(filepath,'rb').read()
137137
self._server.query(key, method=self._server._session.post, data=data)
138138

139+
def setPoster(self, poster):
140+
key = poster._initpath[:-1]
141+
data = '%s?url=%s' % (key, quote_plus(poster.ratingKey))
142+
self._server.query(data, method=self._server._session.put)
139143

140144
def sync(self, videoQuality, client=None, clientId=None, limit=None, unwatched=False, title=None):
141145
""" Add current video (movie, tv-show, season or episode) as sync item for specified device.

0 commit comments

Comments
 (0)