X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=playlist.c;h=95c2230bfca251040fcc5d3224de1a17926026f1;hp=9afa8128d738f9428d01b3b44d73d99f7516d239;hb=5001736840e126342209ae172c04c1328f6bea0d;hpb=d894e0cc7ce94d09847a8a35f47127968d4268f1;ds=sidebyside diff --git a/playlist.c b/playlist.c index 9afa8128..95c2230b 100644 --- a/playlist.c +++ b/playlist.c @@ -28,7 +28,7 @@ static struct playlist_info current_playlist; * * \return The return value of score_update(). */ -int playlist_update_audio_file(struct osl_row *aft_row) +static int playlist_update_audio_file(const struct osl_row *aft_row) { /* always re-insert to the top of the tree */ return score_update(aft_row, 0); @@ -144,8 +144,6 @@ int playlist_check_callback(__a_unused const struct osl_object *query, */ void playlist_close(void) { - int ret; - if (!current_playlist.name) return; free(current_playlist.name); @@ -225,12 +223,15 @@ static int handle_audio_file_event(enum afs_events event, void *data) return score_add(row, 0); /* play it immediately */ } -int playlists_event_handler(enum afs_events event, struct para_buffer *pb, - void *data) +int playlists_event_handler(enum afs_events event, + __a_unused struct para_buffer *pb, void *data) { int ret; + struct afsi_change_event_data *aced = data; switch(event) { + case AFSI_CHANGE: + return playlist_update_audio_file(aced->aft_row); case AUDIO_FILE_RENAME: case AUDIO_FILE_ADD: return handle_audio_file_event(event, data);