mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-14 01:02:59 -07:00
Rename PlexServer attribute
This commit is contained in:
parent
dae6c075d1
commit
c88083aef2
4 changed files with 8 additions and 8 deletions
|
@ -1654,7 +1654,7 @@ class Export(object):
|
|||
self.user_id, self.metadata_level, self.media_info_level,
|
||||
self.thumb_level, self.art_level, self.export_type, self.file_format)
|
||||
|
||||
self.obj = plex.plex
|
||||
self.obj = plex.PlexServer
|
||||
self.media_type = self.export_type
|
||||
|
||||
self.obj_title = user_info['username']
|
||||
|
@ -1667,7 +1667,7 @@ class Export(object):
|
|||
self.section_id, self.metadata_level, self.media_info_level,
|
||||
self.thumb_level, self.art_level, self.export_type, self.file_format)
|
||||
|
||||
self.obj = plex.get_library(str(self.section_id))
|
||||
self.obj = plex.get_library(self.section_id)
|
||||
if self.export_type == 'all':
|
||||
self.media_type = self.obj.type
|
||||
else:
|
||||
|
|
|
@ -249,7 +249,7 @@ def get_playlists(section_id=None, user_id=None):
|
|||
plex = Plex(token=plex_token)
|
||||
|
||||
if user_id:
|
||||
playlists = plex.plex.playlists()
|
||||
playlists = plex.PlexServer.playlists()
|
||||
else:
|
||||
library = plex.get_library(section_id)
|
||||
playlists = library.playlists()
|
||||
|
|
|
@ -56,13 +56,13 @@ class Plex(object):
|
|||
def __init__(self, url=None, token=None):
|
||||
url = url or plexpy.CONFIG.PMS_URL
|
||||
token = token or plexpy.CONFIG.PMS_TOKEN
|
||||
self.plex = PlexObject(url, token)
|
||||
self.PlexServer = PlexObject(url, token)
|
||||
|
||||
def get_library(self, section_id):
|
||||
return self.plex.library.sectionByID(str(section_id))
|
||||
return self.PlexServer.library.sectionByID(int(section_id))
|
||||
|
||||
def get_library_items(self, section_id):
|
||||
return self.get_library(str(section_id)).all()
|
||||
return self.get_library(section_id).all()
|
||||
|
||||
def get_item(self, rating_key):
|
||||
return self.plex.fetchItem(rating_key)
|
||||
return self.PlexServer.fetchItem(rating_key)
|
||||
|
|
|
@ -503,7 +503,7 @@ class PlexTV(object):
|
|||
tokens = users.Users().get_tokens(user_id=device_user_id)
|
||||
if tokens['server_token']:
|
||||
plex = Plex(token=tokens['server_token'])
|
||||
for playlist in plex.plex.playlists():
|
||||
for playlist in plex.PlexServer.playlists():
|
||||
if location_uri.endswith(playlist.guid):
|
||||
rating_key = str(playlist.ratingKey) # String for backwards consistency
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue