Fix missing formats key in error path and clean up format query

pull/153/head
Broque Thomas 2 months ago
parent 6c6651b879
commit c70cfd335a

@ -2227,7 +2227,7 @@ class MusicDatabase:
try: try:
placeholders = ','.join('?' for _ in sibling_ids) placeholders = ','.join('?' for _ in sibling_ids)
cursor.execute(f""" cursor.execute(f"""
SELECT DISTINCT file_path, bitrate FROM tracks SELECT file_path, bitrate FROM tracks
WHERE album_id IN ({placeholders}) AND file_path IS NOT NULL WHERE album_id IN ({placeholders}) AND file_path IS NOT NULL
""", sibling_ids) """, sibling_ids)
@ -2241,7 +2241,6 @@ class MusicDatabase:
elif ext == 'MP3': elif ext == 'MP3':
format_set.add('MP3') format_set.add('MP3')
else: else:
# FLAC, OGG, AAC, etc. — just the extension
format_set.add(ext) format_set.add(ext)
return sorted(format_set) return sorted(format_set)
except Exception as e: except Exception as e:

@ -5760,7 +5760,8 @@ def _check_album_completion(db, album_data: dict, artist_name: str, test_mode: b
"completion_percentage": 0, "completion_percentage": 0,
"confidence": 0.0, "confidence": 0.0,
"found_in_db": False, "found_in_db": False,
"error_message": str(db_error) "error_message": str(db_error),
"formats": []
} }
# Calculate completion percentage # Calculate completion percentage

@ -13381,6 +13381,10 @@ body {
/* Fixed height for consistent layout */ /* Fixed height for consistent layout */
} }
.discography-sections .release-card {
height: fit-content;
}
.release-card:hover { .release-card:hover {
background: linear-gradient(135deg, rgba(40, 40, 40, 0.95) 0%, rgba(30, 30, 30, 0.98) 100%); background: linear-gradient(135deg, rgba(40, 40, 40, 0.95) 0%, rgba(30, 30, 30, 0.98) 100%);
border-color: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.15);

Loading…
Cancel
Save