mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Proxy PMS downloads json through server
This commit is contained in:
parent
d943877e76
commit
b7937b8740
4 changed files with 27 additions and 23 deletions
|
@ -754,7 +754,16 @@ class PlexTV(object):
|
|||
|
||||
return clean_servers
|
||||
|
||||
def get_plex_downloads(self):
|
||||
def get_plex_downloads(self, update_channel):
|
||||
plex_downloads = self.get_plextv_downloads(plexpass=(update_channel == 'beta'))
|
||||
|
||||
try:
|
||||
return json.loads(plex_downloads)
|
||||
except Exception as e:
|
||||
logger.warn("Tautulli PlexTV :: Unable to load JSON for get_plex_updates: %s", e)
|
||||
return {}
|
||||
|
||||
def get_plex_update(self):
|
||||
logger.debug("Tautulli PlexTV :: Retrieving current server version.")
|
||||
|
||||
pms_connect = pmsconnect.PmsConnect()
|
||||
|
@ -763,12 +772,9 @@ class PlexTV(object):
|
|||
update_channel = pms_connect.get_server_update_channel()
|
||||
|
||||
logger.debug("Tautulli PlexTV :: Plex update channel is %s." % update_channel)
|
||||
plex_downloads = self.get_plextv_downloads(plexpass=(update_channel == 'beta'))
|
||||
available_downloads = self.get_plex_downloads(update_channel=update_channel)
|
||||
|
||||
try:
|
||||
available_downloads = json.loads(plex_downloads)
|
||||
except Exception as e:
|
||||
logger.warn("Tautulli PlexTV :: Unable to load JSON for get_plex_updates.")
|
||||
if not available_downloads:
|
||||
return {}
|
||||
|
||||
# Get the updates for the platform
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue