check_playlist));
}
-/**
- * Close the current playlist.
- *
- * \sa \ref playlist_open().
- */
-void playlist_close(void)
+/** Free all resources of the current playlist, if any. */
+void playlist_unload(void)
{
if (!current_playlist.name)
return;
* up in the audio file table. If the path lookup succeeds, a reference to the
* corresponding row of the audio file table is added to the score table.
*
- * \param name The name of the playlist to open.
+ * \param name The name of the playlist to load.
* \param msg Error message or playlist info is returned here.
*
* \return The length of the loaded playlist on success, negative error code
* else. Files which are listed in the playlist, but are not contained in the
* database are ignored. This is not considered an error.
*/
-int playlist_open(const char *name, char **msg)
+int playlist_load(const char *name, char **msg)
{
int ret;
struct playlist_instance *playlist = ¤t_playlist;
*msg = make_message("could not read playlist %s\n", name);
return ret;
}
- playlist_close();
+ playlist_unload();
ret = for_each_line(FELF_READ_ONLY, playlist_def.data,
playlist_def.size, add_playlist_entry, playlist);
osl_close_disk_object(&playlist_def);