Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions plexapi/myplex.py
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ def watchlist(self, filter=None, sort=None, libtype=None, maxresults=None, **kwa

params.update(kwargs)

key = f'{self.METADATA}/library/sections/watchlist/{filter}{utils.joinArgs(params)}'
key = f'{self.DISCOVER}/library/sections/watchlist/{filter}{utils.joinArgs(params)}'
return self._toOnlineMetadata(self.fetchItems(key, maxresults=maxresults), **kwargs)

def onWatchlist(self, item):
Expand Down Expand Up @@ -979,7 +979,7 @@ def addToWatchlist(self, items):
if self.onWatchlist(item):
raise BadRequest(f'"{item.title}" is already on the watchlist')
ratingKey = item.guid.rsplit('/', 1)[-1]
self.query(f'{self.METADATA}/actions/addToWatchlist?ratingKey={ratingKey}', method=self._session.put)
self.query(f'{self.DISCOVER}/actions/addToWatchlist?ratingKey={ratingKey}', method=self._session.put)
return self

def removeFromWatchlist(self, items):
Expand All @@ -1000,7 +1000,7 @@ def removeFromWatchlist(self, items):
if not self.onWatchlist(item):
raise BadRequest(f'"{item.title}" is not on the watchlist')
ratingKey = item.guid.rsplit('/', 1)[-1]
self.query(f'{self.METADATA}/actions/removeFromWatchlist?ratingKey={ratingKey}', method=self._session.put)
self.query(f'{self.DISCOVER}/actions/removeFromWatchlist?ratingKey={ratingKey}', method=self._session.put)
return self

def userState(self, item):
Expand All @@ -1010,7 +1010,7 @@ def userState(self, item):
item (:class:`~plexapi.video.Movie` or :class:`~plexapi.video.Show`): Item to return the user state.
"""
ratingKey = item.guid.rsplit('/', 1)[-1]
data = self.query(f"{self.METADATA}/library/metadata/{ratingKey}/userState")
data = self.query(f"{self.DISCOVER}/library/metadata/{ratingKey}/userState")
Comment thread
simonc56 marked this conversation as resolved.
Outdated
return self.findItem(data, cls=UserState)

def isPlayed(self, item):
Expand All @@ -1034,7 +1034,7 @@ def markPlayed(self, item):
:class:`~plexapi.video.Episode`): Object from searchDiscover().
Can be also result from Plex Movie or Plex TV Series agent.
"""
key = f'{self.METADATA}/actions/scrobble'
key = f'{self.DISCOVER}/actions/scrobble'
Comment thread
simonc56 marked this conversation as resolved.
Outdated
ratingKey = item.guid.rsplit('/', 1)[-1]
params = {'key': ratingKey, 'identifier': 'com.plexapp.plugins.library'}
self.query(key, params=params)
Expand All @@ -1049,7 +1049,7 @@ def markUnplayed(self, item):
:class:`~plexapi.video.Episode`): Object from searchDiscover().
Can be also result from Plex Movie or Plex TV Series agent.
"""
key = f'{self.METADATA}/actions/unscrobble'
key = f'{self.DISCOVER}/actions/unscrobble'
Comment thread
simonc56 marked this conversation as resolved.
Outdated
ratingKey = item.guid.rsplit('/', 1)[-1]
params = {'key': ratingKey, 'identifier': 'com.plexapp.plugins.library'}
self.query(key, params=params)
Expand Down
Loading