Last.fm last played date import: change date if it is newer than the … (#625)
* Last.fm last played date import: change date if it is newer than the one in database * Last.fm lastplayed: make it more consistent with the code
This commit is contained in:
parent
b4c2ae251b
commit
18a67e1f20
|
@ -1380,6 +1380,9 @@ void CollectionBackend::UpdateLastPlayed(const QString &artist, const QString &a
|
|||
QSqlDatabase db(db_->Connect());
|
||||
|
||||
for (const Song &song : songs) {
|
||||
if (song.lastplayed() >= lastplayed) {
|
||||
continue;
|
||||
}
|
||||
QSqlQuery q(db);
|
||||
q.prepare(QString("UPDATE %1 SET lastplayed = :lastplayed WHERE ROWID = :id").arg(songs_table_));
|
||||
q.bindValue(":lastplayed", lastplayed);
|
||||
|
|
Loading…
Reference in New Issue