playlists(3) | libmtp | playlists(3) |
libmtp - playlists
LIBMTP_playlist_t * LIBMTP_new_playlist_t (void)
void LIBMTP_destroy_playlist_t (LIBMTP_playlist_t *)
LIBMTP_playlist_t * LIBMTP_Get_Playlist_List
(LIBMTP_mtpdevice_t *)
LIBMTP_playlist_t * LIBMTP_Get_Playlist
(LIBMTP_mtpdevice_t *, uint32_t const)
int LIBMTP_Create_New_Playlist (LIBMTP_mtpdevice_t *,
LIBMTP_playlist_t *const)
int LIBMTP_Update_Playlist (LIBMTP_mtpdevice_t *,
LIBMTP_playlist_t *const)
int LIBMTP_Set_Playlist_Name (LIBMTP_mtpdevice_t *,
LIBMTP_playlist_t *, const char *)
This routine creates a new playlist based on the metadata supplied. If the tracks field of the metadata contains a track listing, these tracks will be added to the playlist.
Parameters
Returns
See also
LIBMTP_Delete_Object()
References LIBMTP_mtpdevice_struct::default_music_folder, LIBMTP_mtpdevice_struct::default_playlist_folder, LIBMTP_playlist_struct::parent_id, and LIBMTP_mtpdevice_struct::usbinfo.
This destroys a playlist metadata structure and deallocates the memory used by it, including any strings. Never use a track metadata structure again after calling this function on it.
Parameters
See also
References LIBMTP_playlist_struct::name, and LIBMTP_playlist_struct::tracks.
This function retrieves an individual playlist from the device.
Parameters
Returns
See also
References LIBMTP_mtpdevice_struct::usbinfo.
This function returns a list of the playlists available on the device. Typical usage:
Parameters
Returns
See also
References LIBMTP_mtpdevice_struct::usbinfo.
This creates a new playlist metadata structure and allocates memory for it. Notice that if you add strings to this structure they will be freed by the corresponding LIBMTP_destroy_playlist_t operation later, so be careful of using strdup() when assigning strings, e.g.:
LIBMTP_playlist_t *pl = LIBMTP_new_playlist_t(); pl->name = strdup(str); .... LIBMTP_destroy_playlist_t(pl);
Returns
See also
References LIBMTP_playlist_struct::playlist_id.
This function renames a single playlist object file holder. This simply means that the PTP_OPC_ObjectFileName property is updated, if this is supported by the device. The playlist filename should nominally end with an extension like '.pla'.
NOTE: if you want to change the metadata the device display about a playlist you must not use this function, use LIBMTP_Update_Playlist() instead!
Parameters
Returns
See also
This routine updates a playlist based on the metadata supplied. If the tracks field of the metadata contains a track listing, these tracks will be added to the playlist in place of those already present, i.e. the previous track listing will be deleted. For Samsung devices the playlist id (metadata->playlist_id) is likely to change.
Parameters
Returns
See also
LIBMTP_Delete_Object()
References LIBMTP_mtpdevice_struct::usbinfo.
Generated automatically by Doxygen for libmtp from the source code.
Fri Jul 22 2022 | Version 1.1.20 |