diff --git a/setup.sh b/setup.sh index ca7664d..a8585b2 100644 --- a/setup.sh +++ b/setup.sh @@ -585,6 +585,8 @@ def export_pdf(): 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 = Image(img_data, width=3*cm, height=img_height) + except Exception: + img = Paragraph('', styles['Normal']) elif game.url and 'gog.com' in game.url: try: img_path = os.path.join(app.root_path, 'static', 'gog_logo.png') @@ -599,7 +601,7 @@ def export_pdf(): game.redeem_date.strftime('%d.%m.%y') if game.redeem_date else '' ]) - # Table format + # Table format (korrekte Einrückung) table = Table(data, colWidths=col_widths, repeatRows=1) table.setStyle(TableStyle([ ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), @@ -615,13 +617,14 @@ def export_pdf(): doc.build(elements) buffer.seek(0) - return send_file( + return send_file( buffer, mimetype='application/pdf', as_attachment=True, download_name=f'game_export_{datetime.now().strftime("%Y%m%d")}.pdf' ) + @app.route('/import', methods=['GET', 'POST']) @login_required def import_games(): @@ -821,6 +824,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends wget \ && wget -O /app/static/logo.png "https://git.nocci.it/nocci/GiftGamesDB/raw/branch/main/steam-gift-manager/static/logo.png" \ && wget -O /app/static/logo_small.png "https://git.nocci.it/nocci/GiftGamesDB/raw/branch/main/steam-gift-manager/static/logo_small.png" \ && wget -O /app/static/forgejo.svg "https://git.nocci.it/nocci/GiftGamesDB/raw/branch/main/steam-gift-manager/static/forgejo.svg" \ + && wget -O /app/static/gog_logo.png "https://git.nocci.it/nocci/GameKeyManager/raw/branch/dev/steam-gift-manager/static/gog_logo.png" \ && rm -rf /var/lib/apt/lists/* RUN mkdir -p /app/data && \ diff --git a/steam-gift-manager/static/gog_logo.png b/steam-gift-manager/static/gog_logo.png index eaade02..f05c336 100644 Binary files a/steam-gift-manager/static/gog_logo.png and b/steam-gift-manager/static/gog_logo.png differ