RB.StaticPlaylistSource¶
- Subclasses:
None
Methods¶
- Inherited:
RB.PlaylistSource (10), 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 |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
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.StaticPlaylistSource(*args, **kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(shell, name, settings, local, entry_type)¶
- Parameters:
name (
str
) – the playlist namesettings (
Gio.Settings
) –Gio.Settings
instance, orNone
to have one createdlocal (
bool
) – ifTrue
, the playlist is local to the libraryentry_type (
RB.RhythmDBEntryType
) – type of database entries that can be added to the playlist.
- Returns:
new playlist.
- Return type:
Creates a new static playlist source.
- classmethod new_from_xml(shell, name, node)¶
- Parameters:
name (
str
) – playlist namenode (
libxml2.NodePtr
) – XML node containing playlist entries
- Returns:
playlist read from XML
- Return type:
Constructs a new playlist from the given XML document node.
- add_entry(entry, index)¶
- Parameters:
entry (
RB.RhythmDBEntry
) – entry to add to the playlistindex (
int
) – position at which to add it (-1 to add at the end)
Adds the specified entry to the playlist.
- add_location(location, index)¶
- Parameters:
If the location matches an entry in the database, the entry is added to the playlist. Otherwise, if it identifies a directory, the contents of that directory are added.
- add_locations(locations)¶
- Parameters:
locations ([
str
]) – URI strings to add
Adds the locations specified in locations to the playlist. See rb_static_playlist_source_add_location for details.
- load_from_xml(node)¶
- Parameters:
node (
libxml2.NodePtr
) – XML node to load from
Loads the playlist contents from the specified XML document node.
- move_entry(entry, index)¶
- Parameters:
entry (
RB.RhythmDBEntry
) – the entry to moveindex (
int
) – new location for the entry
Moves an entry within the playlist.
- remove_entry(entry)¶
- Parameters:
entry (
RB.RhythmDBEntry
) – the entry to remove
Removes the specified entry from the playlist.