X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=playlist.c;h=826280b9270ff9bc8c9a37f46e376d69a1422671;hp=c6f09bef78bb6e0712a81dea8b4e373788298aca;hb=a40528e00065e7b0edff0edcfd0dd2c6371c9c6b;hpb=b94595f1296c207526af18b821c390d9defec2ef;ds=sidebyside diff --git a/playlist.c b/playlist.c index c6f09bef..826280b9 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); @@ -223,12 +223,24 @@ 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) +/** + * Handle afs events relevant to playlists. + * + * \param event The event type. + * \param pb Unused. + * \param data Depends on the event type. + * + * \return Standard. + */ +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);