RB.PlaylistSource¶
- Subclasses:
Methods¶
- Inherited:
RB.Source (33), RB.DisplayPage (12), Gtk.Box (14), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2)
- Structs:
Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
RB.Source (27), RB.DisplayPage (12), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)
|
|
|
Properties¶
- Inherited:
RB.Source (10), RB.DisplayPage (5), Gtk.Box (3), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
rhythmdb instance |
||
r |
whether this playlist should be saved |
||
r/w/co |
whether this playlist is attached to the local library |
Child Properties¶
- Inherited:
Style Properties¶
- Inherited:
Signals¶
Fields¶
- Inherited:
RB.Source (3), RB.DisplayPage (2), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class RB.PlaylistSource(*args, **kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
- classmethod new_from_xml(shell, node)¶
- Parameters:
node (
libxml2.NodePtr
) – libxml node containing the playlist
- Returns:
the playlist
- Return type:
Constructs a playlist source instance from the XML serialized format. This function knows about all the playlist types that can be saved to disk, and it hands off the XML node to the appropriate constructor based on the ‘type’ attribute of the root node of the playlist.
- add_to_map(location)¶
- Parameters:
location (
str
) – a URI to add- Returns:
True
if the URI was added to the entry map,False
if it was already there.- Return type:
Adds a URI to the playlist’s entry map. This is useful when the URI is being added to the database, but no entry exists for it yet. When the entry is created, it will be added to the query model.
- get_db()¶
- Returns:
the
RB.RhythmDB
instance- Return type:
Returns the
RB.RhythmDB
instance. The caller must not unref the object once finished with it.
- get_query_model()¶
- Returns:
the current
RB.RhythmDBQueryModel
- Return type:
Returns the current
RB.RhythmDBQueryModel
for the playlist. The caller must not unref the object once finished with it.
- mark_dirty()¶
Marks the playlist dirty. This generally means that the playlist will be saved to disk fairly soon, but the exact meaning can vary between playlist types.
- save_playlist(uri, export_type)¶
- Parameters:
uri (
str
) – destination URIexport_type (
RB.PlaylistExportType
) – format to save in
Saves the playlist to an external file in a standard format (M3U, PLS, or XSPF).
- save_to_xml(parent_node)¶
- Parameters:
parent_node (
libxml2.NodePtr
) – libxml node below which to save the playlist
Converts the playlist to XML format, below the specified parent node.
- set_query_model(model)¶
- Parameters:
model (
RB.RhythmDBQueryModel
) – the newRB.RhythmDBQueryModel
Sets a new query model for the playlist. This updates the entry view to use the new query model and also updates the source query-model property.
This needs to be called when the playlist subclass creates a new query model.
- setup_entry_view(entry_view)¶
- Parameters:
entry_view (
RB.EntryView
) – the newRB.EntryView
to set up
Connects signal handlers and sets up drag and drop support for an entry view to be used by a playlist source. This only needs to be called if the playlist subclass is creating a new entry view.
- do_mark_dirty() virtual¶
Marks the playlist dirty. This generally means that the playlist will be saved to disk fairly soon, but the exact meaning can vary between playlist types.
- do_save_contents_to_xml(node) virtual¶
- Parameters:
node (
libxml2.NodePtr
) –
- do_show_entry_view_popup(view, over_entry) virtual¶
- Parameters:
view (
RB.EntryView
) –over_entry (
bool
) –
Property Details¶
- RB.PlaylistSource.props.db¶
- Name:
db
- Type:
- Default Value:
- Flags:
The
RB.RhythmDB
instance
- RB.PlaylistSource.props.dirty¶
-
Whether the playlist has been changed since it was last saved to disk.