From 085210f3647e41bc989a13cd7b413bbadadc119c Mon Sep 17 00:00:00 2001 From: emeric Date: Sat, 14 Jun 2025 13:06:41 +0200 Subject: [PATCH] Subsonic API: report original year for albums, fixes #672 --- src/libs/subsonic/impl/responses/Album.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libs/subsonic/impl/responses/Album.cpp b/src/libs/subsonic/impl/responses/Album.cpp index 2344a18b..cec71030 100644 --- a/src/libs/subsonic/impl/responses/Album.cpp +++ b/src/libs/subsonic/impl/responses/Album.cpp @@ -105,7 +105,9 @@ namespace lms::api::subsonic albumNode.setAttribute("coverArt", idToString(coverArtId)); }); } - if (const auto year{ release->getYear() }) + if (const auto originalYear{ release->getOriginalYear() }) + albumNode.setAttribute("year", *originalYear); + else if (const auto year{ release->getYear() }) albumNode.setAttribute("year", *year); auto artists{ release->getReleaseArtists() };