fix(quick-19): multi-root path resolution for playlist M3U8 tracks

- Replace getLibraryRoot() with getAllLibraryRoots() returning all library paths
- Add resolveM3UPath() for multi-root resolution with knownPaths lookup
- Add toRelativePathMultiRoot() to save relative paths using correct root
- Update removeM3UEntries, replaceM3UEntryPaths, findM3UEntry for []string roots
- Update all 8 call sites in playlist.go for multi-root resolution
- Update existing test signatures for new []string parameter types
- Fix pre-existing golines formatting in scan_queue.go
This commit is contained in:
2026-03-16 01:07:45 -04:00
parent 08216752b2
commit 9144dedc27
4 changed files with 224 additions and 73 deletions
+3 -1
View File
@@ -111,7 +111,9 @@ func (l *Library) SoftScanAllLibraries() error {
// dynamic library_id unsupported by sqlc. No user input.
for _, lib := range libs {
result, claimErr := l.db.ExecContext(
`UPDATE audio_files SET library_id = ? WHERE library_id = 0 AND file_path LIKE ? || '%'`,
`UPDATE audio_files SET library_id = ?`+
` WHERE library_id = 0`+
` AND file_path LIKE ? || '%'`,
lib.ID, lib.Path+"/",
)
if claimErr != nil {