fixed gog pic in route
This commit is contained in:
parent
cef1f900e6
commit
144e43d164
6
setup.sh
6
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'),
|
||||
|
@ -622,6 +624,7 @@ def export_pdf():
|
|||
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 && \
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 68 KiB |
Loading…
Reference in New Issue