RB.StaticPlaylistSource¶
Subclasses: | None |
---|
Methods¶
class | new (shell, name, settings, local, entry_type) |
class | new_from_xml (shell, name, node) |
add_entry (entry, index) |
|
add_location (location, index) |
|
add_locations (locations) |
|
load_from_xml (node) |
|
move_entry (entry, index) |
|
remove_entry (entry) |
|
remove_location (location) |
Virtual Methods¶
Inherited: | RB.PlaylistSource (3), RB.Source (27), RB.DisplayPage (12), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10) |
---|
Properties¶
Inherited: | RB.PlaylistSource (3), RB.Source (10), RB.DisplayPage (5), Gtk.Box (3), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1) |
---|
Child Properties¶
Inherited: | Gtk.Box (5) |
---|
Style Properties¶
Inherited: | Gtk.Widget (17) |
---|
Signals¶
Inherited: | RB.Source (3), RB.DisplayPage (2), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1) |
---|
Fields¶
Inherited: | RB.Source (3), RB.DisplayPage (2), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1) |
---|
Name | Type | Access | Description |
---|---|---|---|
parent | RB.PlaylistSource |
r |
Class Details¶
-
class
RB.
StaticPlaylistSource
(*args, **kwargs)¶ Bases: RB.PlaylistSource
Abstract: No Structure: RB.StaticPlaylistSourceClass
-
classmethod
new
(shell, name, settings, local, entry_type)¶ Parameters: - shell (
RB.Shell
) – theRB.Shell
- name (
str
) – the playlist name - settings (
Gio.Settings
) –Gio.Settings
instance, orNone
to have one created - local (
bool
) – ifTrue
, the playlist is local to the library - entry_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.
- shell (
-
classmethod
new_from_xml
(shell, name, node)¶ Parameters: - shell (
RB.Shell
) – theRB.Shell
- name (
str
) – playlist name - node (
libxml2.NodePtr
) – XML node containing playlist entries
Returns: playlist read from XML
Return type: Constructs a new playlist from the given XML document node.
- shell (
-
add_entry
(entry, index)¶ Parameters: - entry (
RB.RhythmDBEntry
) – entry to add to the playlist - index (
int
) – position at which to add it (-1 to add at the end)
Adds the specified entry to the playlist.
- entry (
-
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 addAdds 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 fromLoads the playlist contents from the specified XML document node.
-
move_entry
(entry, index)¶ Parameters: - entry (
RB.RhythmDBEntry
) – the entry to move - index (
int
) – new location for the entry
Moves an entry within the playlist.
- entry (
-
remove_entry
(entry)¶ Parameters: entry ( RB.RhythmDBEntry
) – the entry to removeRemoves the specified entry from the playlist.
-
classmethod