Functions¶
|
|
|
|
|
|
|
|
|
Details¶
- GrlPls.browse(source, playlist, keys, options, filter_func, callback, *user_data)¶
- Parameters:
source (
Grl.Source) – a sourceplaylist (
Grl.Media) – a playlistoptions (
Grl.OperationOptions) – options wanted for that operationfilter_func (
GrlPls.FilterFuncorNone) – A filter function, orNonecallback (
Grl.SourceResultCb) – the user defined callbackuser_data (
objectorNone) – the user data to pass in the callback
- Returns:
the operation identifier
- Return type:
Browse into a playlist. The playlist entries are returned via the callback function as
Grl.Mediaobjects. This function imitates the API and way of working ofGrl.Source.browse.The playlist provided could be of any
Grl.Mediaclass, as long as its URI points to a valid playlist file.This function is asynchronous.
See
Grl.Source.browse() function for additional information and sample code.New in version 0.2.0.
- GrlPls.browse_by_spec(source, filter_func, bs)¶
- Parameters:
source (
Grl.Source) – a sourcefilter_func (
GrlPls.FilterFuncorNone) – A filter function, orNonebs (
Grl.SourceBrowseSpec) – aGrl.SourceBrowseSpecstructure with details of the browsing operation
Browse into a playlist. The playlist entries are returned via the bs->callback function as
Grl.Mediaobjects. This function is more suitable to be called from plugins, which by design get theGrl.SourceBrowseSpecalready filled in.The bs->playlist provided could be of any
Grl.Mediaclass, as long as its URI points to a valid playlist file.This function is asynchronous.
See
GrlPls.browse() andGrl.Source.browse() function for additional information and sample code.New in version 0.2.0.
- GrlPls.browse_sync(source, playlist, keys, options, filter_func)¶
- Parameters:
source (
Grl.Source) – a sourceplaylist (
Grl.Media) – a playlistoptions (
Grl.OperationOptions) – options wanted for that operationfilter_func (
GrlPls.FilterFuncorNone) – A filter function, orNone
- Raises:
- Returns:
a
GLib.ListwithGrl.Mediaelements. After useGObject.Object.unref() every element and g_list_free() the list.- Return type:
Browse into a playlist. The playlist entries are returned via the callback function as
Grl.Mediaobjects. This function imitates the API and way of working ofGrl.Source.browse_sync.The filter function filter_func will be used for plugins or applications to be able to refuse particular entries from being listed.
If a
Nonefilter function is passed, the media will be added with only the metadata coming from the playlist included.This function is synchronous.
See
Grl.Source.browse_sync() function for additional information and sample code.New in version 0.2.0.
- GrlPls.file_to_media(content, file, info, handle_pls, options)¶
- Parameters:
content (
Grl.Media) – an existingGrl.Mediafor the file, orNonefile (
Gio.File) – aGio.Filepointing to the file or directory in questioninfo (
Gio.FileInfo) – an existingGio.FileInfo, orNonehandle_pls (
bool) – Whether playlists should be handled as containersoptions (
Grl.OperationOptions) – aGrl.OperationOptionsrepresenting the options to apply to this operation.
- Returns:
a new
Grl.Media.- Return type:
This function will update (if content is non-
None) or create aGrl.Mediaand populate it with information from info.If info is
None, a call toGio.File.query_info() will be made.This function is useful for plugins that browse the local filesystem and want to easily create
Grl.Mediafrom filesystem information.New in version 0.2.0.
- GrlPls.get_file_attributes()¶
- Returns:
a string containing the list of attributes.
- Return type:
Returns the list of attributes to pass to
Gio.File.query_info() to make it possible to populate aGrl.MediausingGrlPls.file_to_media().Do not free the result of this function.
New in version 0.2.0.