Added a sentinel when UI limit is hit + a message when nothing found, fixes #358

This commit is contained in:
emeric
2026-06-27 09:55:24 +02:00
parent 00d6ef57f7
commit 2fe4296fa5
116 changed files with 1586 additions and 1650 deletions
@@ -248,11 +248,11 @@ namespace lms::api::subsonic
// Choice: we return nothing if there are too many results
const auto tracks{ db::Track::findIds(context.getDbSession(), params) };
if (tracks.results.size() == 1)
if (tracks.size() == 1)
{
// Choice: we return only the first lyrics if the track has many lyrics
db::TrackLyrics::FindParameters lyricsParams;
lyricsParams.setTrack(tracks.results[0]);
lyricsParams.setTrack(tracks[0]);
lyricsParams.setSortMethod(db::TrackLyricsSortMethod::ExternalFirst);
lyricsParams.setRange(db::Range{ 0, 1 });