Add Konvergo to platform name overrides.

This commit is contained in:
Tim van der Westhuizen 2015-10-22 17:45:23 +02:00
parent 37bc68573c
commit 4ac5329019
5 changed files with 17 additions and 36 deletions

View file

@ -42,3 +42,8 @@ notify_strings[NOTIFY_STOPPED] = "Playback stopped"
DEFAULT_USER_THUMB = "interfaces/default/images/gravatar-default-80x80.png" DEFAULT_USER_THUMB = "interfaces/default/images/gravatar-default-80x80.png"
DEFAULT_POSTER_THUMB = "interfaces/default/images/poster.png" DEFAULT_POSTER_THUMB = "interfaces/default/images/poster.png"
DEFAULT_COVER_THUMB = "interfaces/default/images/cover.png" DEFAULT_COVER_THUMB = "interfaces/default/images/cover.png"
PLATFORM_NAME_OVERRIDES = {'Konvergo': 'Plex Media Player',
'Mystery 3': 'Playstation 3',
'Mystery 4': 'Playstation 4',
'Mystery 5': 'Xbox 360'}

View file

@ -106,10 +106,7 @@ class DataFactory(object):
watched_status = 0 watched_status = 0
# Rename Mystery platform names # Rename Mystery platform names
platform_names = {'Mystery 3': 'Playstation 3', platform = common.PLATFORM_NAME_OVERRIDES.get(item["platform"], item["platform"])
'Mystery 4': 'Playstation 4',
'Mystery 5': 'Xbox 360'}
platform = platform_names.get(item["platform"], item["platform"])
row = {"reference_id": item["reference_id"], row = {"reference_id": item["reference_id"],
"id": item["id"], "id": item["id"],
@ -512,10 +509,7 @@ class DataFactory(object):
for item in result: for item in result:
# Rename Mystery platform names # Rename Mystery platform names
platform_names = {'Mystery 3': 'Playstation 3', platform_type = common.PLATFORM_NAME_OVERRIDES.get(item[0], item[0])
'Mystery 4': 'Playstation 4',
'Mystery 5': 'Xbox 360'}
platform_type = platform_names.get(item[0], item[0])
row = {'platform': item[0], row = {'platform': item[0],
'total_plays': item[1], 'total_plays': item[1],

View file

@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with PlexPy. If not, see <http://www.gnu.org/licenses/>. # along with PlexPy. If not, see <http://www.gnu.org/licenses/>.
from plexpy import logger, database, helpers from plexpy import logger, database, helpers, common
import datetime import datetime
@ -392,10 +392,7 @@ class Graphs(object):
series_3.append(item[3]) series_3.append(item[3])
# Rename Mystery platform names # Rename Mystery platform names
platform_names = [('Mystery 3', 'Playstation 3'), for old_name, new_name in common.PLATFORM_NAME_OVERRIDES:
('Mystery 4', 'Playstation 4'),
('Mystery 5', 'Xbox 360')]
for old_name, new_name in platform_names:
categories = [item.replace(old_name, new_name) for item in categories] categories = [item.replace(old_name, new_name) for item in categories]
series_1_output = {'name': 'TV', series_1_output = {'name': 'TV',
@ -814,10 +811,7 @@ class Graphs(object):
series_3.append(item[3]) series_3.append(item[3])
# Rename Mystery platform names # Rename Mystery platform names
platform_names = [('Mystery 3', 'Playstation 3'), for old_name, new_name in common.PLATFORM_NAME_OVERRIDES:
('Mystery 4', 'Playstation 4'),
('Mystery 5', 'Xbox 360')]
for old_name, new_name in platform_names:
categories = [item.replace(old_name, new_name) for item in categories] categories = [item.replace(old_name, new_name) for item in categories]
series_1_output = {'name': 'Direct Play', series_1_output = {'name': 'Direct Play',

View file

@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with PlexPy. If not, see <http://www.gnu.org/licenses/>. # along with PlexPy. If not, see <http://www.gnu.org/licenses/>.
from plexpy import logger, helpers, users, http_handler from plexpy import logger, helpers, users, http_handler, common
from urlparse import urlparse from urlparse import urlparse
import plexpy import plexpy
@ -1071,11 +1071,8 @@ class PmsConnect(object):
logger.warn(u"No known stream types found in session list.") logger.warn(u"No known stream types found in session list.")
# Rename Mystery platform names # Rename Mystery platform names
platform_names = {'Mystery 3': 'Playstation 3', session_output['platform'] = common.PLATFORM_NAME_OVERRIDES.get(session_output['platform'],
'Mystery 4': 'Playstation 4', session_output['platform'])
'Mystery 5': 'Xbox 360'}
session_output['platform'] = platform_names.get(session_output['platform'],
session_output['platform'])
return session_output return session_output

View file

@ -85,10 +85,7 @@ class Users(object):
user_thumb = item['user_thumb'] user_thumb = item['user_thumb']
# Rename Mystery platform names # Rename Mystery platform names
platform_names = {'Mystery 3': 'Playstation 3', platform = common.PLATFORM_NAME_OVERRIDES.get(item["platform"], item["platform"])
'Mystery 4': 'Playstation 4',
'Mystery 5': 'Xbox 360'}
platform = platform_names.get(item["platform"], item["platform"])
row = {"id": item['id'], row = {"id": item['id'],
"plays": item['plays'], "plays": item['plays'],
@ -179,10 +176,7 @@ class Users(object):
thumb = item["thumb"] thumb = item["thumb"]
# Rename Mystery platform names # Rename Mystery platform names
platform_names = {'Mystery 3': 'Playstation 3', platform = common.PLATFORM_NAME_OVERRIDES.get(item["platform"], item["platform"])
'Mystery 4': 'Playstation 4',
'Mystery 5': 'Xbox 360'}
platform = platform_names.get(item["platform"], item["platform"])
row = {"id": item['id'], row = {"id": item['id'],
"last_seen": item['last_seen'], "last_seen": item['last_seen'],
@ -533,10 +527,7 @@ class Users(object):
for item in result: for item in result:
# Rename Mystery platform names # Rename Mystery platform names
platform_names = {'Mystery 3': 'Playstation 3', platform_type = common.PLATFORM_NAME_OVERRIDES.get(item[2], item[2])
'Mystery 4': 'Playstation 4',
'Mystery 5': 'Xbox 360'}
platform_type = platform_names.get(item[2], item[2])
row = {'player_name': item[0], row = {'player_name': item[0],
'platform_type': platform_type, 'platform_type': platform_type,