missing-artwork-handling #15

Merged
odecif merged 2 commits from missing-artwork-handling into master 2022-10-28 15:39:45 +02:00
2 changed files with 12 additions and 5 deletions
Showing only changes of commit dee805633e - Show all commits

View File

@ -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)

View File

@ -75,10 +75,12 @@
<p>{{game.game.cdkey}}</p> <p>{{game.game.cdkey}}</p>
{% endif %} {% endif %}
{% if 'linuxinstructions' in game.game %}
<h3>{{lang_game_linuxinstructions}}</h3> <h3>{{lang_game_linuxinstructions}}</h3>
{% for part in game.game.linuxinstructions %} {% for part in game.game.linuxinstructions %}
<p>{{part}}</p> <p>{{part}}</p>
{% endfor %} {% endfor %}
{% endif%}
{% endblock %} {% endblock %}
</body> </body>
</html> </html>