Files
yellowjacket/frontend/wailsjs/go/library/Library.js
T
yonlu 943db1cf27 feat(11-01): per-library scan pipeline with queue coordinator
Task 1: Schema, events, and progress types
- Add library_id to CreateAudioFile SQL INSERT and regenerate sqlc code
- Add LibraryScanQueued and LibraryScanQueueDrained event constants
- Regenerate TypeScript events via genevents
- Add LibraryID, LibraryName, QueuedCount to ScanProgress
- Add LibraryID, LibraryName to ScanMetrics
- Add libraryID field to importResult for threading through pipeline

Task 2: Scan queue coordinator and per-library scanning
- Create scan_queue.go with ScanLibrary(id), ScanAllLibraries()
- Add CancelCurrentScan(), CancelAllScans() for queue-aware cancellation
- FIFO scan queue with silent dedup (same library already scanning or queued)
- Refactor Scan() -> scanInternal(libraryID, libraryName, libraryPath)
- Replace GetAllAudioFiles with GetAudioFilesByLibrary for per-library loading
- Thread libraryID through DB writer to set CreateAudioFileParams.LibraryID
- drainQueue auto-starts next queued library or emits LibraryScanQueueDrained
- Pause freezes current scan AND queue
- Add GetScanQueueLength() and QueuedLibraryNames() for UI
- Mark CancelScan() and Scan() as deprecated
2026-03-09 16:02:54 -04:00

96 lines
2.5 KiB
JavaScript
Executable File

// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export function CancelAllScans() {
return window['go']['library']['Library']['CancelAllScans']();
}
export function CancelCurrentScan() {
return window['go']['library']['Library']['CancelCurrentScan']();
}
export function CancelScan() {
return window['go']['library']['Library']['CancelScan']();
}
export function FullRescan() {
return window['go']['library']['Library']['FullRescan']();
}
export function GetAlbumTracks(arg1) {
return window['go']['library']['Library']['GetAlbumTracks'](arg1);
}
export function GetAlbumsByArtist(arg1) {
return window['go']['library']['Library']['GetAlbumsByArtist'](arg1);
}
export function GetAllAlbums() {
return window['go']['library']['Library']['GetAllAlbums']();
}
export function GetAllArtists() {
return window['go']['library']['Library']['GetAllArtists']();
}
export function GetAllGenresWithCounts() {
return window['go']['library']['Library']['GetAllGenresWithCounts']();
}
export function GetAllTracks() {
return window['go']['library']['Library']['GetAllTracks']();
}
export function GetScanQueueLength() {
return window['go']['library']['Library']['GetScanQueueLength']();
}
export function GetTracksByGenre(arg1) {
return window['go']['library']['Library']['GetTracksByGenre'](arg1);
}
export function IsScanActive() {
return window['go']['library']['Library']['IsScanActive']();
}
export function IsScanPaused() {
return window['go']['library']['Library']['IsScanPaused']();
}
export function PauseScan() {
return window['go']['library']['Library']['PauseScan']();
}
export function QueuedLibraryNames() {
return window['go']['library']['Library']['QueuedLibraryNames']();
}
export function ResumeScan() {
return window['go']['library']['Library']['ResumeScan']();
}
export function Scan() {
return window['go']['library']['Library']['Scan']();
}
export function ScanAllLibraries() {
return window['go']['library']['Library']['ScanAllLibraries']();
}
export function ScanLibrary(arg1) {
return window['go']['library']['Library']['ScanLibrary'](arg1);
}
export function SearchTracks(arg1) {
return window['go']['library']['Library']['SearchTracks'](arg1);
}
export function SetContext(arg1) {
return window['go']['library']['Library']['SetContext'](arg1);
}
export function SetRescanHooks(arg1) {
return window['go']['library']['Library']['SetRescanHooks'](arg1);
}