Sanitize player name
This commit is contained in:
@@ -89,13 +89,16 @@ class Users(object):
|
||||
# Rename Mystery platform names
|
||||
platform = common.PLATFORM_NAME_OVERRIDES.get(item["platform"], item["platform"])
|
||||
|
||||
# Sanitize player name
|
||||
player = helpers.sanitize(item["player"])
|
||||
|
||||
row = {"id": item['id'],
|
||||
"plays": item['plays'],
|
||||
"last_seen": item['last_seen'],
|
||||
"friendly_name": item['friendly_name'],
|
||||
"ip_address": item['ip_address'],
|
||||
"platform": platform,
|
||||
"player": item['player'],
|
||||
"player": player,
|
||||
"last_watched": item['last_watched'],
|
||||
"thumb": thumb,
|
||||
"media_type": item['media_type'],
|
||||
@@ -180,12 +183,15 @@ class Users(object):
|
||||
# Rename Mystery platform names
|
||||
platform = common.PLATFORM_NAME_OVERRIDES.get(item["platform"], item["platform"])
|
||||
|
||||
# Sanitize player name
|
||||
player = helpers.sanitize(item["player"])
|
||||
|
||||
row = {"id": item['id'],
|
||||
"last_seen": item['last_seen'],
|
||||
"ip_address": item['ip_address'],
|
||||
"play_count": item['play_count'],
|
||||
"platform": platform,
|
||||
"player": item['player'],
|
||||
"player": player,
|
||||
"last_watched": item['last_watched'],
|
||||
"thumb": thumb,
|
||||
"media_type": item['media_type'],
|
||||
@@ -531,7 +537,10 @@ class Users(object):
|
||||
# Rename Mystery platform names
|
||||
platform_type = common.PLATFORM_NAME_OVERRIDES.get(item[2], item[2])
|
||||
|
||||
row = {'player_name': item[0],
|
||||
# Sanitize player name
|
||||
player = helpers.sanitize(item[0])
|
||||
|
||||
row = {'player_name': player,
|
||||
'platform_type': platform_type,
|
||||
'total_plays': item[1],
|
||||
'result_id': result_id
|
||||
|
Reference in New Issue
Block a user