Fix updating play and skip count

This commit is contained in:
Jonas Kvinge
2019-04-19 14:02:28 +02:00
parent dffc46551e
commit 40db9f7020
7 changed files with 13 additions and 1 deletions

View File

@@ -1068,6 +1068,7 @@ bool CollectionBackend::ExecQuery(CollectionQuery *q) {
}
void CollectionBackend::IncrementPlayCount(int id) {
if (id == -1) return;
QMutexLocker l(db_->Mutex());
@@ -1081,6 +1082,7 @@ void CollectionBackend::IncrementPlayCount(int id) {
if (db_->CheckErrors(q)) return;
Song new_song = GetSongById(id, db);
emit SongsStatisticsChanged(SongList() << new_song);
}
@@ -1098,6 +1100,7 @@ void CollectionBackend::IncrementSkipCount(int id, float progress) {
if (db_->CheckErrors(q)) return;
Song new_song = GetSongById(id, db);
emit SongsStatisticsChanged(SongList() << new_song);
}
@@ -1115,6 +1118,7 @@ void CollectionBackend::ResetStatistics(int id) {
if (db_->CheckErrors(q)) return;
Song new_song = GetSongById(id, db);
emit SongsStatisticsChanged(SongList() << new_song);
}