fix(images): key favorites by the real root and case-normalized path

Folder names are not unique across gallery roots, so two roots shown as
"output" shared each other's stars. Favorites are now keyed by the
root's real, case-normalized path (server-side only) and a
case-normalized relative path, so a Windows case-only rename keeps its
star while distinct Linux files stay distinct. Toggles look the file up
in a per-scan dictionary instead of walking the listing.
This commit is contained in:
Vito Sansevero
2026-10-19 23:05:34 -07:00
parent 7bdbc3635a
commit c49b9e171a
5 changed files with 187 additions and 56 deletions
+1 -1
View File
@@ -488,7 +488,7 @@ class TestRestoreFromFile(BackupTestCase):
with closing(sqlite3.connect(str(backups[0]))) as conn:
self.assertEqual(
conn.execute(
"SELECT root_label, relative_path FROM image_favorites"
"SELECT root_key, relative_path FROM image_favorites"
).fetchall(),
[("output", "live.png")],
)