struct osl_object afsi_obj;
struct afs_info new_afsi;
int ret = get_hash_of_row(aft_row, &aft_hash);
+ struct afsi_change_event_data aced;
if (ret < 0)
return ret;
new_afsi.num_played++;
new_afsi.last_played = time(NULL);
save_afsi(&new_afsi, &afsi_obj); /* in-place update */
- if (afd->current_play_mode == PLAY_MODE_PLAYLIST)
- ret = playlist_update_audio_file(aft_row);
- else {
- struct afsi_change_event_data aced = {.aft_row = aft_row,
- .old_afsi = &afd->afsi};
- afs_event(AFSI_CHANGE, NULL, &aced);
- }
+
+ aced.aft_row = aft_row;
+ aced.old_afsi = &afd->afsi;
+ afs_event(AFSI_CHANGE, NULL, &aced);
+
return ret;
err:
free(afd->afhi.chunk_table);