diff --git a/src/library/dao/trackdao.cpp b/src/library/dao/trackdao.cpp index e763a29481c..3f853368bad 100644 --- a/src/library/dao/trackdao.cpp +++ b/src/library/dao/trackdao.cpp @@ -1246,6 +1246,31 @@ bool TrackDAO::updateCoverArt(int trackId, int coverId) { return true; } +bool TrackDAO::updateCoverArt(QList trackIds, QList coverIds) { + if (trackIds.isEmpty() || coverIds.isEmpty()) { + return false; + } + + // TODO: it should be done in a single query + QSqlQuery query(m_database); + for (int i=0; i trackIds, QList coverIds); signals: void trackDirty(int trackId);