Override MacOSX pms platform

This commit is contained in:
JonnyWong16 2016-09-03 13:57:17 -07:00
parent fa51df192d
commit 762192518f
3 changed files with 12 additions and 13 deletions

View file

@ -31,14 +31,6 @@ PLATFORM_VERSION = platform.release()
BRANCH = version.PLEXPY_VERSION
VERSION_NUMBER = version.PLEXPY_RELEASE_VERSION
# Notification Types
NOTIFY_STARTED = 1
NOTIFY_STOPPED = 2
notify_strings = {}
notify_strings[NOTIFY_STARTED] = "Playback started"
notify_strings[NOTIFY_STOPPED] = "Playback stopped"
DEFAULT_USER_THUMB = "interfaces/default/images/gravatar-default-80x80.png"
DEFAULT_POSTER_THUMB = "interfaces/default/images/poster.png"
DEFAULT_COVER_THUMB = "interfaces/default/images/cover.png"
@ -47,7 +39,11 @@ DEFAULT_ART = "interfaces/default/images/art.png"
PLATFORM_NAME_OVERRIDES = {'Konvergo': 'Plex Media Player',
'Mystery 3': 'Playstation 3',
'Mystery 4': 'Playstation 4',
'Mystery 5': 'Xbox 360'}
'Mystery 5': 'Xbox 360'
}
PMS_PLATFORM_NAME_OVERRIDES = {'MacOSX': 'Mac'
}
MEDIA_FLAGS_AUDIO = {'ac.?3': 'dolby_digital',
'truehd': 'dolby_truehd',

View file

@ -21,6 +21,7 @@ import json
from xml.dom import minidom
import plexpy
import common
import database
import helpers
import http_handler
@ -628,12 +629,13 @@ class PlexTV(object):
return {}
# Get the updates for the platform
platform_downloads = available_downloads.get('computer').get(plexpy.CONFIG.PMS_PLATFORM) or \
available_downloads.get('nas').get(plexpy.CONFIG.PMS_PLATFORM)
pms_platform = common.PMS_PLATFORM_NAME_OVERRIDES.get(plexpy.CONFIG.PMS_PLATFORM, plexpy.CONFIG.PMS_PLATFORM)
platform_downloads = available_downloads.get('computer').get(pms_platform) or \
available_downloads.get('nas').get(pms_platform)
if not platform_downloads:
logger.error(u"PlexPy PlexTV :: Unable to retrieve Plex updates: Could not match server platform: %s."
% plexpy.CONFIG.PMS_PLATFORM)
% pms_platform)
return {}
v_old = helpers.cast_to_int("".join(v.zfill(4) for v in plexpy.CONFIG.PMS_VERSION.split('-')[0].split('.')[:4]))

View file

@ -2791,7 +2791,8 @@ class WebInterface(object):
plex_tv = plextv.PlexTV()
plexpass = plex_tv.get_plexpass_status()
return {'plexpass': plexpass,
'pms_platform': plexpy.CONFIG.PMS_PLATFORM,
'pms_platform': common.PMS_PLATFORM_NAME_OVERRIDES.get(
plexpy.CONFIG.PMS_PLATFORM, plexpy.CONFIG.PMS_PLATFORM),
'pms_update_channel': plexpy.CONFIG.PMS_UPDATE_CHANNEL,
'pms_update_distro': plexpy.CONFIG.PMS_UPDATE_DISTRO,
'pms_update_distro_build': plexpy.CONFIG.PMS_UPDATE_DISTRO_BUILD}