mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-26 05:30:20 +00:00
Adding music/tidal url and function
This commit is contained in:
parent
f7938cf06e
commit
d6f7ad7e10
1 changed files with 11 additions and 0 deletions
|
@ -78,6 +78,7 @@ class MyPlexAccount(PlexObject):
|
|||
WEBSHOWS = 'https://webshows.provider.plex.tv/hubs/' # get
|
||||
NEWS = 'https://news.provider.plex.tv/hubs/' # get
|
||||
PODCASTS = 'https://podcasts.provider.plex.tv/hubs/' # get
|
||||
MUSIC = 'https://music.provider.plex.tv/hubs/' # get
|
||||
# Key may someday switch to the following url. For now the current value works.
|
||||
# https://plex.tv/api/v2/user?X-Plex-Token={token}&X-Plex-Client-Identifier={clientId}
|
||||
key = 'https://plex.tv/users/account'
|
||||
|
@ -658,6 +659,16 @@ class MyPlexAccount(PlexObject):
|
|||
|
||||
return items
|
||||
|
||||
def tidal(self):
|
||||
""" Returns a list of tidal Hub items :class:`~plexapi.library.Hub`
|
||||
"""
|
||||
items = []
|
||||
data = self.query(url=self.MUSIC)
|
||||
for elem in data:
|
||||
items.append(Hub(server=self._server, data=elem))
|
||||
|
||||
return items
|
||||
|
||||
|
||||
class MyPlexUser(PlexObject):
|
||||
""" This object represents non-signed in users such as friends and linked
|
||||
|
|
Loading…
Reference in a new issue