From cd0e88d28d693ec335716369e7571e619bbc4428 Mon Sep 17 00:00:00 2001 From: emeric Date: Tue, 20 Aug 2024 19:03:28 +0200 Subject: [PATCH] Added support for comment tag, fixes #510 --- SUBSONIC.md | 35 ++++++++++--------- approot/tracks.xml | 4 +++ src/libs/database/impl/Migration.cpp | 12 ++++++- src/libs/database/include/database/Track.hpp | 6 ++++ src/libs/database/test/Track.cpp | 20 +++++++++++ src/libs/metadata/impl/Parser.cpp | 1 + src/libs/metadata/include/metadata/Types.hpp | 1 + src/libs/metadata/test/Parser.cpp | 4 +++ .../scanner/impl/ScanStepScanFiles.cpp | 1 + src/libs/subsonic/impl/responses/Song.cpp | 1 + src/lms/ui/explore/TrackListHelpers.cpp | 10 ++++-- src/tools/metadata/LmsMetadata.cpp | 3 ++ 12 files changed, 78 insertions(+), 20 deletions(-) diff --git a/SUBSONIC.md b/SUBSONIC.md index 25f246cd1..b23195660 100644 --- a/SUBSONIC.md +++ b/SUBSONIC.md @@ -6,7 +6,7 @@ Given the API limitations of folder navigation commands, it is recommended to pl The Subsonic API is enabled by default. -__Note__: since _LMS_ may store hashed and salted passwords or may forward authentication requests to external services, it cannot handle the __token authentication__ method. You may need to check your client to make sure to use the __password__ authentication method. Since logins/passwords are passed in plain text through URLs, it is highly recommended to use a unique password when using the Subsonic API. Note that this may affect the use of authentication via PAM. In any case, ensure that read access to the web server logs (and to the proxy, if applicable) is well protected. +__Note__: since _LMS_ may store hashed and salted passwords or may forward authentication requests to external services, it cannot handle the __token authentication__ method. You may need to check your client to make sure to use the __password__ authentication method. Since logins/passwords are passed in plain text through URLs, it is highly recommended to use a unique password when using the Subsonic API. Note that this may affect the use of authentication via PAM. In any case, ensure the web server logs (and proxy logs, if applicable) are properly secured. # OpenSubsonic API OpenSubsonic is an initiative to patch and extend the legacy Subsonic API. You'll find more details in the [official documentation](https://opensubsonic.netlify.app/) @@ -14,32 +14,33 @@ OpenSubsonic is an initiative to patch and extend the legacy Subsonic API. You'l ## Extra fields The following extra fields are implemented: * `Album` response: - * `mediaType` - * `played` - * `musicBrainzId` - * `genres` * `artists` + * `discTitles`: discs with no subtitle are omitted * `displayArtist` - * `releaseTypes` + * `genres` + * `isCompilation` + * `played` + * `mediaType` * `moods` + * `musicBrainzId` * `originalReleaseDate` - * `isCompilation` - * `discTitles`: discs with no subtitle are omitted + * `releaseTypes` * `Child` response: + * `albumArtists` + * `artists` * `bitDepth` - * `samplingRate` * `channelCount` - * `mediaType` - * `played` - * `musicBrainzId`: note this is actually the recording MBID when this response refers to a song - * `genres` - * `artists` - * `displayArtist` - * `albumArtists` - * `displayAlbumArtist` + * `comment` * `contributors` + * `displayAlbumArtist` + * `displayArtist` + * `genres` + * `mediaType` * `moods` + * `musicBrainzId`: note this is actually the recording MBID when this response refers to a song + * `played` * `replayGain` + * `samplingRate` * `Artist` response: * `mediaType` * `musicBrainzId` diff --git a/approot/tracks.xml b/approot/tracks.xml index 23bc4d735..25a5984c6 100644 --- a/approot/tracks.xml +++ b/approot/tracks.xml @@ -125,6 +125,10 @@ ${playcount} + ${} +
+
${comment}
+ ${
}