projectm_playlist_insert_preset

Function projectm_playlist_insert_preset 

Source
pub unsafe extern "C" fn projectm_playlist_insert_preset(
    instance: projectm_playlist_handle,
    filename: *const c_char,
    index: u32,
    allow_duplicates: bool,
) -> bool
Expand description

@brief Adds a single preset to the playlist at the specified position.

To always add a file at the end of the playlist, use projectm_playlist_add_preset() as it is performs better.

@note The file is not checked for existence or for being readable.

@param instance The playlist manager instance. @param filename A local preset filename. @param index The index to insert the preset at. If it exceeds the playlist size, the preset is added at the end of the playlist. @param allow_duplicates If true, the preset filename will always be added. If false, the preset is only added to the playlist if the exact filename doesn’t exist in the current playlist. @return True if the file was added to the playlist, false if the file was a duplicate and allow_duplicates was set to false.