Add proper check for collection song in edit tag dialog

This commit is contained in:
Jonas Kvinge 2020-08-10 21:27:27 +02:00
parent b9a94ad3ae
commit 673ded3819
1 changed files with 5 additions and 2 deletions

View File

@ -843,8 +843,11 @@ void EditTagDialog::ResetPlayCounts() {
song->set_skipcount(0); song->set_skipcount(0);
song->set_lastplayed(-1); song->set_lastplayed(-1);
app_->collection_backend()->ResetStatisticsAsync(song->id()); if (song->is_collection_song())
app_->collection_backend()->ResetStatisticsAsync(song->id());
UpdateStatisticsTab(*song); UpdateStatisticsTab(*song);
} }
void EditTagDialog::FetchTag() { void EditTagDialog::FetchTag() {
@ -919,7 +922,7 @@ void EditTagDialog::SongSaveComplete(TagReaderReply *reply, const QString &filen
QString message = tr("An error occurred writing metadata to '%1'").arg(filename); QString message = tr("An error occurred writing metadata to '%1'").arg(filename);
emit Error(message); emit Error(message);
} }
else if (song.directory_id() != -1) { else if (song.is_collection_song()) {
app_->collection_backend()->AddOrUpdateSongs(SongList() << song); app_->collection_backend()->AddOrUpdateSongs(SongList() << song);
} }