mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-10 14:14:19 +00:00
change discover search url (#1239)
This commit is contained in:
parent
5cd832e5a1
commit
9fd46872cd
1 changed files with 2 additions and 1 deletions
|
@ -111,6 +111,7 @@ class MyPlexAccount(PlexObject):
|
|||
# Hub sections
|
||||
VOD = 'https://vod.provider.plex.tv' # get
|
||||
MUSIC = 'https://music.provider.plex.tv' # get
|
||||
DISCOVER = 'https://discover.provider.plex.tv'
|
||||
METADATA = 'https://metadata.provider.plex.tv'
|
||||
key = 'https://plex.tv/api/v2/user'
|
||||
|
||||
|
@ -1056,7 +1057,7 @@ class MyPlexAccount(PlexObject):
|
|||
'includeMetadata': 1
|
||||
}
|
||||
|
||||
data = self.query(f'{self.METADATA}/library/search', headers=headers, params=params)
|
||||
data = self.query(f'{self.DISCOVER}/library/search', headers=headers, params=params)
|
||||
searchResults = data['MediaContainer'].get('SearchResults', [])
|
||||
searchResult = next((s.get('SearchResult', []) for s in searchResults if s.get('id') == 'external'), [])
|
||||
|
||||
|
|
Loading…
Reference in a new issue