aft.c: Remove special case code for playlist mode.
authorAndre Noll <maan@systemlinux.org>
Sun, 21 Oct 2007 12:59:20 +0000 (14:59 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 21 Oct 2007 12:59:20 +0000 (14:59 +0200)
aft.c

diff --git a/aft.c b/aft.c
index d77d7ea..b9db5a8 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -619,6 +619,7 @@ int open_and_update_audio_file(struct osl_row *aft_row, struct audio_file_data *
        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;
@@ -648,13 +649,11 @@ int open_and_update_audio_file(struct osl_row *aft_row, struct audio_file_data *
        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);