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