Added basic support for artist.nfo file parsing, ref #640

This commit is contained in:
emeric
2025-03-22 17:21:08 +01:00
parent 67a6b660be
commit e349e14101
32 changed files with 905 additions and 12 deletions
@@ -23,6 +23,7 @@
#include "core/Random.hpp"
#include "core/Service.hpp"
#include "database/Artist.hpp"
#include "database/ArtistInfo.hpp"
#include "database/Cluster.hpp"
#include "database/Directory.hpp"
#include "database/MediaLibrary.hpp"
@@ -544,6 +545,11 @@ namespace lms::api::subsonic
break;
}
}
ArtistInfo::find(context.dbSession, id, Range{ .offset = 0, .size = 1 }, [&](const ArtistInfo::pointer& artistInfo) {
if (!artistInfo->getBiography().empty())
artistInfoNode.setAttribute("biography", artistInfo->getBiography());
});
}
auto similarArtistsId{ core::Service<recommendation::IRecommendationService>::get()->getSimilarArtists(id, { TrackArtistLinkType::Artist, TrackArtistLinkType::ReleaseArtist }, count) };