Merge branch 'fix/249-unbounded-growth' into batch/248-249
Both branches add to the same two registries, so the conflicts are between the two fixes rather than with main: - backend/app.go: both register a janitor job. Both are registered. - backend/maintenance/sweeps.go: both append a job at the end of the file. Both are kept, each with its own closing tail. - backend/maintenance/maintenance_test.go: both append a test. Both are kept as separate functions. - backend/library/library.go: #249's orphan-path lyrics delete was written against the loop variable before #250 renamed it, so its `audioFile.ID` no longer exists in that function. Adapted to `f.ID`. Closes #248 Closes #249
This commit is contained in:
@@ -499,6 +499,10 @@ func (yj *YellowJacketApp) OnStartup(ctx context.Context) {
|
||||
PostRemove: yj.explore.InvalidateLibrarySync,
|
||||
})
|
||||
|
||||
// A deleted playlist must not leave the queue's "Playing from"
|
||||
// label pointing at it.
|
||||
yj.playlist.SetOnPlaylistDeleted(yj.queue.DropSourceForPlaylist)
|
||||
|
||||
// Register playback finished handler to drive queue auto-advance.
|
||||
yj.player.SetPlaybackFinishedHandler(yj.queue.OnPlaybackFinished)
|
||||
|
||||
@@ -776,6 +780,7 @@ func (yj *YellowJacketApp) startJanitor() {
|
||||
|
||||
yj.janitor.Register(maintenance.ExpiredHTTPCacheJob(yj.database))
|
||||
yj.janitor.Register(maintenance.StaleArtistMetadataJob(yj.database))
|
||||
yj.janitor.Register(maintenance.StaleSearchClicksJob(yj.database))
|
||||
yj.janitor.Register(maintenance.OrphanedCoverFilesJob(
|
||||
yj.database, coversDir, library.CoverArtFileSet,
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user