improved library scan speeds, added library manager component

-libraries tab now opens a library manager
-choose library directory, manually soft scan and rescan
-batched db queues
-mp3 header-based duration extraction
This commit is contained in:
2026-02-19 10:17:09 -05:00
parent 8c013d4179
commit 81793975b4
36 changed files with 2350 additions and 179 deletions
+23
View File
@@ -1185,6 +1185,29 @@ func (q *Queue) GetState() State {
}
}
// Clear removes all tracks from the queue, stops playback, and
// resets the queue state. It persists the cleared state and
// notifies the frontend.
func (q *Queue) Clear() {
q.mu.Lock()
defer q.mu.Unlock()
q.logger.Info("Clearing queue")
q.tracks = nil
q.currentIndex = -1
q.shuffleOrder = nil
q.sourcePlaylistID = 0
if q.player != nil {
q.player.UnloadTrack()
}
q.persistTracks()
q.persistState()
q.emitQueueChanged()
}
// EmitCurrentState emits the current queue state to the frontend.
// This is called after the frontend DOM is ready.
func (q *Queue) EmitCurrentState() {