feat: Logo- und Favicon-Routing hinzugefügt; Versionsnummer auf 1.0.65 erhöht
This commit is contained in:
11
app.py
11
app.py
@@ -1508,6 +1508,17 @@ def index():
|
|||||||
|
|
||||||
@app.route('/logo.png')
|
@app.route('/logo.png')
|
||||||
def r_logo():
|
def r_logo():
|
||||||
|
logo = Path(__file__).with_name('PiCopy_Logo.png')
|
||||||
|
if not logo.exists():
|
||||||
|
try:
|
||||||
|
data = _urlreq.urlopen(f'{RAW_BASE}/PiCopy_Logo.png', timeout=15).read()
|
||||||
|
logo.write_bytes(data)
|
||||||
|
except Exception:
|
||||||
|
return '', 404
|
||||||
|
return send_file(logo, mimetype='image/png')
|
||||||
|
|
||||||
|
@app.route('/favicon.ico')
|
||||||
|
def r_favicon():
|
||||||
logo = Path(__file__).with_name('PiCopy_Logo.png')
|
logo = Path(__file__).with_name('PiCopy_Logo.png')
|
||||||
if logo.exists():
|
if logo.exists():
|
||||||
return send_file(logo, mimetype='image/png')
|
return send_file(logo, mimetype='image/png')
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
1.0.64
|
1.0.65
|
||||||
Reference in New Issue
Block a user