quintodrome/server
Deluan Quintão 5bc2bbb70e
feat(subsonic): append album version to names in Subsonic API (#5111)
* feat(subsonic): append album version to album names in Subsonic API responses

Add AppendAlbumVersion config option (default: true) that appends the
album version tag to album names in Subsonic API responses, similar to
how AppendSubtitle works for track titles. This affects album names in
childFromAlbum and buildAlbumID3 responses.

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(subsonic): append album version to media file album names in Subsonic API

Add FullAlbumName() to MediaFile that appends the album version tag,
mirroring the Album.FullName() behavior. Use it in childFromMediaFile
and fakePath to ensure media file responses also show the album version.

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(subsonic): use len() check for album version tag to prevent panic on empty slice

Use len(tags) > 0 instead of != nil to safely guard against empty
slices when accessing the first element of the album version tag.

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(subsonic): use FullName in buildAlbumDirectory and deduplicate FullName calls

Apply album.FullName() in buildAlbumDirectory (getMusicDirectory) so
album names are consistent across all Subsonic endpoints. Also compute
al.FullName() once in childFromAlbum to avoid redundant calls.

Signed-off-by: Deluan <deluan@navidrome.org>

* fix: use len() check in MediaFile.FullTitle() to prevent panic on empty slice

Apply the same safety improvement as FullAlbumName() and Album.FullName()
for consistency.

Signed-off-by: Deluan <deluan@navidrome.org>

* test: add tests for Album.FullName, MediaFile.FullTitle, and MediaFile.FullAlbumName

Cover all cases: config enabled/disabled, tag present, tag absent, and
empty tag slice.

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-02-26 10:50:12 -05:00
..
backgrounds chore(deps): bump golangci-lint to v2.10.0 and suppress new gosec false positives 2026-02-17 09:28:42 -05:00
e2e feat(subsonic): sort search3 results by relevance (#5086) 2026-02-23 08:51:54 -05:00
events fix(ui): activity Indicator switching constantly between online/offline (#5054) 2026-02-17 14:47:20 -05:00
nativeapi refactor: move playlist business logic from repositories to service layer (#5027) 2026-02-21 19:57:13 -05:00
public chore(deps): bump golangci-lint to v2.10.0 and suppress new gosec false positives 2026-02-17 09:28:42 -05:00
subsonic feat(subsonic): append album version to names in Subsonic API (#5111) 2026-02-26 10:50:12 -05:00
testdata fix(server): improve error message for encrypted TLS private keys (#4742) 2025-11-28 17:08:34 -05:00
auth.go refactor: run Go modernize (#5002) 2026-02-08 09:57:30 -05:00
auth_test.go refactor: run Go modernize (#5002) 2026-02-08 09:57:30 -05:00
initial_setup.go chore(server): add logs to begin/end transaction 2025-02-24 19:13:42 -05:00
initial_setup_test.go Upgrade Ginkgo to V2 2022-07-26 16:53:17 -04:00
middlewares.go refactor: run Go modernize (#5002) 2026-02-08 09:57:30 -05:00
middlewares_test.go feat(ui): show user's lastAccess (#3342) 2024-09-30 20:46:10 -04:00
serve_index.go feat(server): add ExtAuth logout URL configuration (#5074) 2026-02-23 20:28:38 -05:00
serve_index_test.go feat(server): add ExtAuth logout URL configuration (#5074) 2026-02-23 20:28:38 -05:00
server.go chore(deps): bump golangci-lint to v2.10.0 and suppress new gosec false positives 2026-02-17 09:28:42 -05:00
server_suite_test.go Rename log.LevelCritical to log.LevelFatal 2022-12-21 14:53:36 -05:00
server_test.go feat(plugins): New Plugin System with multi-language PDK support (#4833) 2026-01-14 19:22:48 -05:00