Še malo šminke (št. pesmi) in 9900 za prikaz istega preko tipkovnice. #9
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -362,6 +362,11 @@ async function openAbout() {
|
||||
document.getElementById('about-name').textContent = data.name;
|
||||
document.getElementById('about-version').textContent = 'Verzija ' + data.version;
|
||||
document.getElementById('about-description').textContent = data.description;
|
||||
|
||||
// Dodaj število pesmi
|
||||
if (data.song_count !== undefined) {
|
||||
document.getElementById('about-description').innerHTML += `<br><br>Število pesmi v bazi: <strong>${data.song_count}</strong>`;
|
||||
}
|
||||
|
||||
const authorsList = document.getElementById('about-authors');
|
||||
authorsList.innerHTML = '';
|
||||
|
||||
Reference in New Issue
Block a user