mirror of
https://github.com/navidrome/navidrome.git
synced 2026-07-09 17:18:45 +00:00
* fix(plugins): discard buffered scrobbles when a plugin is removed Scrobbles are buffered in the DB per service, keyed by the plugin name. When a plugin was removed (deleted from the plugins folder and detected by the sync), its pending buffer entries were left behind forever: the drain goroutine is stopped on the next scrobbler refresh, so the rows were never retried nor discarded. Worse, if a plugin with the same name was installed later, the stale entries would be drained into it - potentially a completely unrelated plugin that just reuses the name. Add a Discard(service) method to ScrobbleBufferRepository and call it from removePluginFromDB, right after the plugin record is deleted. Disabling a plugin intentionally keeps its buffered scrobbles, consistent with the buffer's purpose of surviving temporary outages, and transient unload/reload cycles during config updates are unaffected since they never delete the plugin record. * fix(plugins): don't wipe builtin scrobbler queues on plugin removal Buffer entries are keyed by service name only, and removePluginFromDB runs for any removed plugin file, so removing a plugin named e.g. lastfm.ndp - regardless of its capability - would discard the builtin Last.fm retry queue. Skip the discard when the plugin name is owned by a registered builtin scrobbler, exposed via a new scrobbler.IsBuiltinScrobbler helper. Reported by Codex review on the PR. Also drop the testBroker usage from the new removePluginFromDB spec: it is defined in manager_test.go which is excluded on Windows, breaking the Windows test build. sendPluginRefreshEvent is nil-safe, so no broker is needed. |
||
|---|---|---|
| .. | ||
| fixtures | ||
| fake_http_client.go | ||
| init_tests.go | ||
| mock_album_repo.go | ||
| mock_artist_repo.go | ||
| mock_data_store.go | ||
| mock_ffmpeg.go | ||
| mock_genre_repo.go | ||
| mock_library_repo.go | ||
| mock_library_service.go | ||
| mock_mediafile_repo.go | ||
| mock_playlist_repo.go | ||
| mock_playlist_track_repo.go | ||
| mock_playqueue_repo.go | ||
| mock_plugin_manager.go | ||
| mock_plugin_repo.go | ||
| mock_property_repo.go | ||
| mock_radio_repository.go | ||
| mock_scanner.go | ||
| mock_scrobble_buffer_repo.go | ||
| mock_scrobble_repo.go | ||
| mock_share_repo.go | ||
| mock_transcoding_repo.go | ||
| mock_user_props_repo.go | ||
| mock_user_repo.go | ||
| mock_user_service.go | ||
| navidrome-test.toml | ||
| test_helpers.go | ||