generic gog picture if gog game
This commit is contained in:
parent
b1aee9e5b8
commit
a284ae3963
9
setup.sh
9
setup.sh
|
@ -590,6 +590,10 @@ def export_pdf():
|
||||||
img_url = f"https://cdn.cloudflare.steamstatic.com/steam/apps/{game.steam_appid}/header.jpg"
|
img_url = f"https://cdn.cloudflare.steamstatic.com/steam/apps/{game.steam_appid}/header.jpg"
|
||||||
img_data = io.BytesIO(requests.get(img_url, timeout=5).content)
|
img_data = io.BytesIO(requests.get(img_url, timeout=5).content)
|
||||||
img = Image(img_data, width=3*cm, height=img_height)
|
img = Image(img_data, width=3*cm, height=img_height)
|
||||||
|
elif game.url and 'gog.com' in game.url:
|
||||||
|
try:
|
||||||
|
img_path = os.path.join(app.root_path, 'static', 'gog_logo.png')
|
||||||
|
img = Image(img_path, width=3*cm, height=img_height)
|
||||||
except Exception:
|
except Exception:
|
||||||
img = Paragraph('', styles['Normal'])
|
img = Paragraph('', styles['Normal'])
|
||||||
|
|
||||||
|
@ -1108,6 +1112,9 @@ cat <<HTML_END > templates/index.html
|
||||||
{% if game.steam_appid %}
|
{% if game.steam_appid %}
|
||||||
<img src="https://cdn.cloudflare.steamstatic.com/steam/apps/{{ game.steam_appid }}/header.jpg"
|
<img src="https://cdn.cloudflare.steamstatic.com/steam/apps/{{ game.steam_appid }}/header.jpg"
|
||||||
alt="Steam Header" style="height:64px;max-width:120px;object-fit:cover;">
|
alt="Steam Header" style="height:64px;max-width:120px;object-fit:cover;">
|
||||||
|
{% elif game.url and 'gog.com' in game.url %}
|
||||||
|
<img src="{{ url_for('static', filename='gog_logo.png') }}"
|
||||||
|
alt="GOG Logo" style="height:48px;max-width:120px;object-fit:contain;">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td>{{ game.name }}</td>
|
<td>{{ game.name }}</td>
|
||||||
|
@ -1598,7 +1605,7 @@ CSS_END
|
||||||
echo -e "\n\033[1;32m✅ Setup done! Seems to be okay!\033[0m"
|
echo -e "\n\033[1;32m✅ Setup done! Seems to be okay!\033[0m"
|
||||||
echo -e "Have a look in your .env"
|
echo -e "Have a look in your .env"
|
||||||
echo -e "nano .env"
|
echo -e "nano .env"
|
||||||
echo -e "\n\033[1;32m✔️ After you are done start the system with:\033[0m"
|
echo -e "\n\033[1;32m✅ After you are done start the system with:\033[0m"
|
||||||
echo -e "cd steam-gift-manager"
|
echo -e "cd steam-gift-manager"
|
||||||
echo -e "docker-compose build --no-cache && docker-compose up -d"
|
echo -e "docker-compose build --no-cache && docker-compose up -d"
|
||||||
echo -e "\nGenerate translations: ./translate.sh"
|
echo -e "\nGenerate translations: ./translate.sh"
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 44 KiB |
Loading…
Reference in New Issue