Compare commits
No commits in common. "c336fce9e9757010f4073ad936f16179fc0a4636" and "ffaff83c78b75755fe49161da842876d12420021" have entirely different histories.
c336fce9e9
...
ffaff83c78
@ -23,23 +23,15 @@ def game(predefinednfo=False, return_dict=False, skip_artwork=False):
|
||||
# Add front cover artwork in medium size
|
||||
artpath = os.path.dirname(nfopath)+'/art/'
|
||||
i = 0
|
||||
if 'artwork' in nfo['game']:
|
||||
if nfo['game']['artwork']:
|
||||
for art in nfo['game']['artwork']:
|
||||
if skip_artwork is False:
|
||||
nfo['game']['artwork'][i]['data'] = reduceartcv2(
|
||||
artpath+art['filename'], 'thumbnail')
|
||||
if art['type'] == 'front':
|
||||
nfo['game']['displayimage'] = reduceartcv2(
|
||||
artpath+art['filename'], 'thumbnail')
|
||||
i += 1
|
||||
if 'displayimage' not in nfo['game']:
|
||||
for art in nfo['game']['artwork']:
|
||||
if art['type'] == 'cd':
|
||||
nfo['game']['displayimage'] = reduceartcv2(
|
||||
artpath+art['filename'], 'thumbnail')
|
||||
else:
|
||||
nfo['game']['displayimage'] = ""
|
||||
for art in nfo['game']['artwork']:
|
||||
if skip_artwork is False:
|
||||
nfo['game']['artwork'][i]['data'] = reduceartcv2(
|
||||
artpath+art['filename'], 'thumbnail')
|
||||
if art['type'] == 'front':
|
||||
nfo['game']['displayimage'] = reduceartcv2(
|
||||
artpath+art['filename'], 'thumbnail')
|
||||
i += 1
|
||||
|
||||
if return_dict is False:
|
||||
return jsonify(nfo)
|
||||
return nfo
|
||||
|
||||
@ -27,12 +27,7 @@ def game(lang_code):
|
||||
|
||||
# game['game']['plot'] = game['game']['plot'].replace("\\n", "<br />")
|
||||
game['game']['plot'] = game['game']['plot'].split('\\n')
|
||||
if 'linuxinstructions' in game['game']:
|
||||
if game['game']['linuxinstructions'] != "":
|
||||
game['game']['linuxinstructions'] = (
|
||||
game['game']['linuxinstructions'].split('\\n'))
|
||||
else:
|
||||
game['game'].pop('linuxinstructions')
|
||||
game['game']['linuxinstructions'] = game['game']['linuxinstructions'].split('\\n')
|
||||
return render_template('game.html', game=game,
|
||||
**languages[lang_code], lang_code=lang_code)
|
||||
|
||||
|
||||
@ -75,12 +75,10 @@
|
||||
<p>{{game.game.cdkey}}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if 'linuxinstructions' in game.game %}
|
||||
<h3>{{lang_game_linuxinstructions}}</h3>
|
||||
{% for part in game.game.linuxinstructions %}
|
||||
<p>{{part}}</p>
|
||||
{% endfor %}
|
||||
{% endif%}
|
||||
<h3>{{lang_game_linuxinstructions}}</h3>
|
||||
{% for part in game.game.linuxinstructions %}
|
||||
<p>{{part}}</p>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user