mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 23:42:37 -07:00
Sanitize player name
This commit is contained in:
parent
8c4292f9ac
commit
b47ccd06f9
5 changed files with 35 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue