Plex needs the refresh to be a PUT request

Otherwise you get `plexapi.exceptions.BadRequest: (405) method_not_allowed`
This commit is contained in:
Steven Smith 2015-10-29 02:11:23 +08:00 committed by blha303
parent 0fc4202e75
commit 471a51d265

View file

@ -2,6 +2,7 @@
PlexVideo
"""
import re
from requests import put
from plexapi.client import Client
from plexapi.media import Media, Country, Director, Genre, Producer, Actor, Writer
from plexapi.myplex import MyPlexUser
@ -111,7 +112,7 @@ class Video(PlexPartialObject):
client.playMedia(self)
def refresh(self):
self.server.query('/%s/refresh' % self.key)
self.server.query('/%s/refresh' % self.key, method=put)
class Movie(Video):