feat: Add library ID support to media scanner and worker
Add default library ID functionality to improve library targeting during media scans. Service changes in internal/services/media_scanner.go: - Add defaultLibraryID field to MediaScanner struct - Add SetLibraryID() method to set default library - Modify processMediaFile() to use defaultLibraryID when set - Prioritizes defaultLibraryID over folder-based library detection - Provides explicit library targeting for scans Service changes in internal/services/worker.go: - Add libraryUUID conversion from string to pgtype.UUID - Call scanner.SetLibraryID() before ScanFolders() - Ensures scanner respects the job's library ID These changes enable more precise library targeting during media scans, allowing scans to be directed to specific libraries rather than relying solely on folder-based detection.
This commit is contained in:
@@ -7,3 +7,12 @@ func activeClass(current, target string) string {
|
||||
}
|
||||
return base + "hover:opacity-80"
|
||||
}
|
||||
|
||||
func ContainsString(slice []string, item string) bool {
|
||||
for _, s := range slice {
|
||||
if s == item {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user