*
* \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);
*/
void playlist_close(void)
{
+ if (!current_playlist.name)
+ return;
free(current_playlist.name);
current_playlist.name = NULL;
}
PARA_NOTICE_LOG("failed to load playlist %s\n", name);
return ret;
}
+ playlist_close();
ret = load_playlist(row, ¤t_playlist);
- return (ret == -E_PLAYLIST_LOADED)? 1 : ret;
+ return (ret == -E_PLAYLIST_LOADED)? current_playlist.length : ret;
}
static int search_path(char *path, 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;