Fixed a case where moving a file may be broken (when skipping duplicate MBID is active) + only check for duplicate track MBID (instead of recording MBID) as we have have several different releases sharing the same recording MBID)
This commit is contained in:
@@ -209,6 +209,18 @@ Track::exists(Session& session, TrackId id)
|
||||
return session.getDboSession().query<int>("SELECT 1 from track").where("id = ?").bind(id).resultValue() == 1;
|
||||
}
|
||||
|
||||
std::vector<Track::pointer>
|
||||
Track::findByMBID(Session& session, const UUID& mbid)
|
||||
{
|
||||
session.checkSharedLocked();
|
||||
|
||||
auto res {session.getDboSession().find<Track>()
|
||||
.where("mbid = ?").bind(std::string {mbid.getAsString()})
|
||||
.resultList()};
|
||||
|
||||
return std::vector<Track::pointer>(res.begin(), res.end());
|
||||
}
|
||||
|
||||
std::vector<Track::pointer>
|
||||
Track::findByRecordingMBID(Session& session, const UUID& mbid)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user