Še malo šminke (št. pesmi) in 9900 za prikaz istega preko tipkovnice. #9

This commit is contained in:
2026-03-27 21:37:34 +01:00
parent f75a6f04dd
commit c80bebe1f0
3 changed files with 58 additions and 0 deletions

View File

@@ -207,6 +207,13 @@ def get_app_info():
# appinfo.json je v korenskem imeniku projekta
with open('appinfo.json', 'r', encoding='utf-8') as f:
info = json.load(f)
# Dodaj število pesmi v bazi
if _projector_app is not None:
_projector_app.cursor.execute("SELECT COUNT(*) FROM songs")
count = _projector_app.cursor.fetchone()[0]
info['song_count'] = count
return jsonify(info)
except Exception as e:
return jsonify({'error': str(e)}), 500