navidrome/tests
Deluan Quintão 96b051ffa7
fix(nativeapi): stop partial PUTs from clearing untouched columns (#6058)
* fix(nativeapi): stop partial PUTs from clearing untouched columns

The REST layer parses the request body's top-level JSON keys and passes them
to Repository.Update as colsToUpdate. The radio and library repositories
discarded that list and issued a full-row UPDATE, so any field absent from
the body was written as its zero value.

For radio this wiped uploaded_image, deleting the station's cover on every
partial update (the Web UI is unaffected because its form submits the whole
record). For library it silently cleared remote_path and default_new_users.

Thread the column list through to Put in both repositories, and extract the
column-selection half of filterUpdateValues into selectUpdateColumns so
library, which hand-builds its update map, shares the same rule instead of
copying it.

Fixes #6057

* refactor(persistence): drop pluginRepository's dead rest.Persistable methods

Save and Update had no callers: PUT /api/plugin/{id} is served by the
hand-written updatePlugin handler over a typed request struct, and the
route only wires rest.GetAll and rest.Get. Both methods delegated to Put,
which upserts all twelve columns, so wiring rest.Put to this repository
would have reintroduced the partial-update clobbering fixed in the previous
commit. Removing them, along with the rest.Persistable assertion, makes
that a compile error instead of a silent data loss.

Put itself is unchanged and still backs plugin discovery.
2026-08-31 11:21:32 -04:00
..
fixtures refactor(lyrics): single ParseLyrics entry point + all-format plugin lyrics (#5632) 2026-06-19 18:25:35 -04:00
harness feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
fake_http_client.go Retry calls to Last.FM without MBIDs when if returns artist invalid (#1138) 2021-05-27 20:53:24 -04:00
init_tests.go fix: assorted scanner, plugin, and server fixes from the Go 1.27 work (#6050) 2026-08-30 21:24:50 -04:00
mock_album_repo.go feat(ui): add Refresh Metadata to the album and artist context menus (#6036) 2026-08-25 23:59:40 -04:00
mock_artist_repo.go refactor: simplify return statements 2026-08-30 12:44:09 -04:00
mock_artwork_queue_repo.go perf(artwork): cap the stale-absent recheck at 100 items per kind per hour (#6007) 2026-08-21 15:23:07 -04:00
mock_artwork_repo.go feat(artwork): store the resolution trace so artwork explain works offline (#5980) 2026-08-21 10:24:01 -04:00
mock_data_store.go feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
mock_ffmpeg.go fix(transcoding): include ffprobe in MSI and fall back gracefully when absent (#5326) 2026-04-07 20:11:38 -04:00
mock_genre_repo.go fix(jellyfin): resolve genre id as a MusicGenre item 2026-08-10 21:37:57 -04:00
mock_library_repo.go fix(nativeapi): stop partial PUTs from clearing untouched columns (#6058) 2026-08-31 11:21:32 -04:00
mock_library_service.go feat(plugins): New Plugin System with multi-language PDK support (#4833) 2026-01-14 19:22:48 -05:00
mock_mediafile_repo.go refactor: simplify return statements 2026-08-30 12:44:09 -04:00
mock_playlist_repo.go feat(instant-mix): support album, playlist and genre sources (#5948) 2026-08-12 23:02:13 -04:00
mock_playlist_track_repo.go feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
mock_playqueue_repo.go feat(server): add update and clear play queue endpoints to native API (#4215) 2025-06-11 12:02:31 -04:00
mock_plugin_manager.go feat(plugins): allow mounting library directories as read-write (#5122) 2026-02-28 10:59:13 -05:00
mock_plugin_repo.go fix(plugins): clear plugin errors on startup to allow retrying 2026-03-02 08:56:56 -05:00
mock_property_repo.go refactor: external_metadata -> external.Provider (#3903) 2025-04-08 21:11:09 -04:00
mock_radio_repository.go feat(artwork): new artwork pipeline with background resolution and Low Quality Image Placeholders (#5847) 2026-08-09 15:03:27 -04:00
mock_scanner.go fix(server): return correct scanType in startScan response (#5159) 2026-03-09 14:19:53 -04:00
mock_scrobble_buffer_repo.go fix(plugins): discard buffered scrobbles when a plugin is removed (#5737) 2026-07-08 12:37:17 -04:00
mock_scrobble_repo.go feat(server): add scrobble history Native API (#5761) 2026-07-13 11:32:03 -04:00
mock_share_repo.go fix(sharing): validate JWT expiration and share existence on stream endpoint (#5426) 2026-04-27 19:36:57 -04:00
mock_tag_repo.go feat(jellyfin): filter items by year and record label (#5817) 2026-07-19 12:39:31 -04:00
mock_transcoding_repo.go fix(transcoding): place -ss before -i for fast input seeking (#5492) 2026-05-13 17:17:20 -03:00
mock_user_props_repo.go refactor: external_metadata -> external.Provider (#3903) 2025-04-08 21:11:09 -04:00
mock_user_repo.go fix(scanner): import playlists skipped when no admin existed yet (#5609) 2026-06-14 13:39:16 -04:00
mock_user_service.go feat(plugins): New Plugin System with multi-language PDK support (#4833) 2026-01-14 19:22:48 -05:00
navidrome-test.toml feat(plugins): experimental support for plugins (#3998) 2025-06-22 20:45:38 -04:00
test_helpers.go ci: run Go tests on Windows (#5380) 2026-04-19 13:16:47 -04:00