- 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);
- }
- return ret;
-err:
+
+ ret = load_chunk_info(&chunk_table_obj, &afd->afhi);
+ if (ret < 0)
+ goto err;
+ ret = get_attribute_text(&afd->afsi.attributes, " ", &tmp);
+ if (ret < 0)
+ goto err;
+ tmp[sizeof(afd->attributes_string) - 1] = '\0';
+ strcpy(afd->attributes_string, tmp); /* OK */
+ free(tmp);
+
+ aced.aft_row = aft_row;
+ aced.old_afsi = &afd->afsi;
+ afs_event(AFSI_CHANGE, NULL, &aced);
+ ret = save_afd(afd);
+ if (ret < 0)
+ goto err;