SubsonicAPI: optimized search for tracks

This commit is contained in:
emeric
2023-11-04 17:36:59 +01:00
parent c4d2d20447
commit bd59dc3bc9
27 changed files with 3162 additions and 3301 deletions
@@ -110,6 +110,7 @@ namespace API::Subsonic
trackResponse.setAttribute("playCount", Listen::getCount(context.dbSession, user->getId(), user->getScrobblingBackend(), track->getId()));
trackResponse.setAttribute("path", getTrackPath(track));
{
// TODO, store this in DB
std::error_code ec;
const auto fileSize{ std::filesystem::file_size(track->getPath(), ec) };
if (!ec)