fixed multilinks
This commit is contained in:
parent
87e6c8eb08
commit
8b65b704da
|
@ -36,10 +36,24 @@ def show_match(tournament_id, match_id):
|
||||||
for idx, _ in enumerate(participant['lineup']):
|
for idx, _ in enumerate(participant['lineup']):
|
||||||
participant['lineup'][idx]['custom_fields']['summoner_name'] = \
|
participant['lineup'][idx]['custom_fields']['summoner_name'] = \
|
||||||
participant['lineup'][0]['custom_fields']
|
participant['lineup'][0]['custom_fields']
|
||||||
|
summoner_names = list()
|
||||||
|
for player in participant['lineup']:
|
||||||
|
summoner_names.append(player['custom_fields']['summoner_name'])
|
||||||
|
multilink_params = {
|
||||||
|
'query': ','.join(summoner_names)
|
||||||
|
}
|
||||||
|
participant['opgg_multilink'] = urllib.parse.urlencode(multilink_params)
|
||||||
elif participant['lineup'][0]['custom_fields'] == {}:
|
elif participant['lineup'][0]['custom_fields'] == {}:
|
||||||
for idx, _ in enumerate(participant['lineup']):
|
for idx, _ in enumerate(participant['lineup']):
|
||||||
participant['lineup'][idx]['custom_fields']['summoner_name'] = \
|
participant['lineup'][idx]['custom_fields']['summoner_name'] = \
|
||||||
participant['lineup'][idx]['name']
|
participant['lineup'][idx]['name']
|
||||||
|
summoner_names = list()
|
||||||
|
for player in participant['lineup']:
|
||||||
|
summoner_names.append(player['custom_fields']['summoner_name'])
|
||||||
|
multilink_params = {
|
||||||
|
'query': ','.join(summoner_names)
|
||||||
|
}
|
||||||
|
participant['opgg_multilink'] = urllib.parse.urlencode(multilink_params)
|
||||||
else:
|
else:
|
||||||
for idx, _ in enumerate(participant['lineup']):
|
for idx, _ in enumerate(participant['lineup']):
|
||||||
participant['lineup'][idx]['custom_fields']['summoner_name'] = 'N/V'
|
participant['lineup'][idx]['custom_fields']['summoner_name'] = 'N/V'
|
||||||
|
|
Loading…
Reference in New Issue