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
@@ -183,10 +183,10 @@ namespace lms::scanner
auto transaction{ session.createReadTransaction() };
const auto artists{ db::Artist::findWithMBIDNameVariants(session, lastRetrievedArtist, db::Range{ .offset = 0, .size = batchSize }) };
if (artists.results.empty())
if (artists.empty())
break;
for (const db::Artist::pointer& artist : artists.results)
for (const db::Artist::pointer& artist : artists)
{
bool hasArtistInfo{};
db::ArtistInfo::find(session, artist->getId(), db::Range{ .offset = 0, .size = 1 }, [&](const db::ArtistInfo::pointer&) {
@@ -218,7 +218,7 @@ namespace lms::scanner
}
}
if (!artists.moreResults)
if (artists.size() < batchSize)
break;
}