RB.Shell¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
|
||
r/w/co |
|
||
r/w/co |
|
||
r |
|
||
r/w/co |
Whether or not to disable plugins |
||
r |
|||
r |
|||
r/w/co |
Whether or not this is a dry run |
||
r/w/co |
Whether or not to register |
||
r/w/co |
Whether or not to update the library |
||
r |
|
||
r/w/co |
The playlists file to use |
||
r |
|
||
r |
|
||
r/w/co |
The |
||
r |
|
||
r |
|
||
r |
task list |
||
r |
|
||
r/w |
Current window visibility |
||
r |
|
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when creating a new |
|
Emitted when a custom notification should be displayed to the user. |
|
Emitted when a notification should be displayed showing the current playing entry. |
|
Emitted after the visibility of the main Rhythmbox window has changed. |
|
Emitted before the visibility of the main window changes. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class RB.Shell(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- activate_source(source, play)¶
- Parameters:
- Raises:
- Return type:
- activate_source_by_uri(source_uri, play)¶
- Parameters:
- Raises:
- Returns:
True
if successful- Return type:
Searches for a source matching source_uri and if found, selects it, and depending on the value of play, may start playing from it. Device-based sources will match the device node or mount point URI. Other types of sources may have their own URI scheme or format. This is part of the DBus interface.
- add_uri(uri, title, genre)¶
- Parameters:
- Raises:
- Returns:
True
if the URI was added successfully- Return type:
Adds the specified URI to the Rhythmbox database. Whether the title and genre specified are actually used is up to the source that handles the URI
- add_widget(widget, location, expand, fill)¶
- Parameters:
widget (
Gtk.Widget
) – theGtk.Widget
to insert into the main windowlocation (
RB.ShellUILocation
) – the location at which to insert the widgetexpand (
bool
) – whether the widget should be given extra spacefill (
bool
) – whether the widget should fill all space allocated to it
Adds a widget to the main Rhythmbox window. See
Gtk.Box.pack_start
for details on how the expand and fill parameters work.
- append_display_page(page, parent)¶
- Parameters:
page (
RB.DisplayPage
) – the newRB.DisplayPage
parent (
RB.DisplayPage
orNone
) – the parent page for the new page
Adds a new display page to the shell.
- do_notify(requested)¶
- Parameters:
requested (
bool
) – ifTrue
, the notification was requested by some explicit user action- Raises:
- Returns:
not important
- Return type:
Displays a notification of the current playing track.
- get_song_properties(uri)¶
- Parameters:
uri (
str
) – the URI to query- Raises:
- Returns:
True
if the URI is found in the database- properties:
returns the properties of the specified URI
- Return type:
(
bool
, properties: {str
:GObject.Value
})
Gathers and returns all metadata (including extra metadata such as album art URIs and lyrics) for the specified URI.
- get_source_by_entry_type(type)¶
- Parameters:
type (
RB.RhythmDBEntryType
) – entry type for which to find a source- Returns:
source instance, if any
- Return type:
Looks up and returns the source that owns entries of the specified type.
- guess_source_for_uri(uri)¶
- Parameters:
uri (
str
) – the URI to guess a source for- Returns:
the most appropriate
RB.Source
for the uri- Return type:
Attempts to locate the source that should handle the specified URI. This iterates through all sources, calling
RB.Source.want_uri
, returning the source that returns the highest value.
- load_uri(uri, play)¶
- Parameters:
- Raises:
- Returns:
True
if the URI was added successfully- Return type:
Loads a URI representing a single song, a directory, a playlist, or an internet radio station, and optionally starts playing it.
For playlists containing only stream URLs, we either add the playlist itself (if it’s remote) or each URL from it (if it’s local). The main reason for this is so clicking on stream playlist links in web browsers works properly - the playlist file will be downloaded to /tmp/, and we can’t add that to the database, so we need to add the stream URLs instead.
- notify_custom(timeout, primary, secondary, image_uri, requested)¶
- present(timestamp)¶
- Parameters:
timestamp (
int
) – GTK timestamp to use (for focus-stealing prevention)- Raises:
- Returns:
not used.
- Return type:
Attempts to display the main window to the user. See
Gtk.Window.present
for details.
- quit()¶
- Raises:
- Returns:
not important
- Return type:
Begins the process of shutting down Rhythmbox. This function will return. The error parameter and return value only exist because this function is part of the DBus interface.
- register_entry_type_for_source(source, type)¶
- Parameters:
type (
RB.RhythmDBEntryType
) – theRB.RhythmDBEntryType
to register for
Registers a source as the owner of entries of the specified type. The main effect of this is that calling
RB.Shell.get_source_by_entry_type
with the same entry type will return the source. A source should only be registered as the owner of a single entry type.
- remove_widget(widget, location)¶
- Parameters:
widget (
Gtk.Widget
) – theGtk.Widget
to remove from the main windowlocation (
RB.ShellUILocation
) – the UI location to which the widget was originally added
Removes a widget added with
RB.Shell.add_widget
from the main window.
- set_song_property(uri, propname, value)¶
- Parameters:
uri (
str
) – the URI to modifypropname (
str
) – the name of the property to modifyvalue (
GObject.Value
) – the new value to set
- Raises:
- Returns:
True
if the property was set successfully.- Return type:
Attempts to set a property of a database entry identified by its URI. If the URI identifies a file and the property is one associated with a file metadata tag, the new value will be written to the file.
- toggle_visibility()¶
Toggles the visibility of the main Rhythmbox window.
- do_create_song_info(song_info, multi) virtual¶
- Parameters:
song_info (
RB.SongInfo
) –multi (
bool
) –
- do_database_load_complete() virtual¶
- do_removable_media_scan_finished() virtual¶
Signal Details¶
- RB.Shell.signals.create_song_info(shell, song_info, multi)¶
- Signal Name:
create-song-info
- Flags:
- Parameters:
shell (
RB.Shell
) – The object which received the signalsong_info (
RB.SongInfo
) – the newRB.SongInfo
windowmulti (
bool
) – ifTrue
, the song info window is for multiple entries
Emitted when creating a new
RB.SongInfo
window. Signal handlers can add pages to the song info window notebook to display additional information.
- RB.Shell.signals.notify_custom(shell, timeout, primary, secondary, image_uri, requested)¶
- Signal Name:
notify-custom
- Flags:
- Parameters:
shell (
RB.Shell
) – The object which received the signaltimeout (
int
) – length of time (in seconds) to display the notificationprimary (
str
) – main notification textsecondary (
str
) – secondary notification textimage_uri (
str
) – URI for an image to include in the notification (optional)requested (
bool
) – ifTrue
, the notification was triggered by an explicit user action
Emitted when a custom notification should be displayed to the user.
- RB.Shell.signals.notify_playing_entry(shell, requested)¶
- Signal Name:
notify-playing-entry
- Flags:
- Parameters:
Emitted when a notification should be displayed showing the current playing entry.
- RB.Shell.signals.visibility_changed(shell, visibile)¶
- Signal Name:
visibility-changed
- Flags:
- Parameters:
Emitted after the visibility of the main Rhythmbox window has changed.
- RB.Shell.signals.visibility_changing(shell, initial, visible)¶
- Signal Name:
visibility-changing
- Flags:
- Parameters:
- Return type:
Emitted before the visibility of the main window changes. The return value overrides the visibility setting. If multiple signal handlers are attached, the last one wins.
Property Details¶
- RB.Shell.props.accel_group¶
- Name:
accel-group
- Type:
- Default Value:
- Flags:
A
Gtk.AccelGroup
instance to use for additional accelerator keys
- RB.Shell.props.application¶
- Name:
application
- Type:
- Default Value:
- Flags:
RB.Application
instance
- RB.Shell.props.autostarted¶
- Name:
autostarted
- Type:
- Default Value:
- Flags:
Whether Rhythmbox was automatically started by the session manager
- RB.Shell.props.db¶
- Name:
db
- Type:
- Default Value:
- Flags:
The
RB.RhythmDB
instance
- RB.Shell.props.disable_plugins¶
- Name:
disable-plugins
- Type:
- Default Value:
- Flags:
If
True
, disable plugins
- RB.Shell.props.display_page_model¶
- Name:
display-page-model
- Type:
- Default Value:
- Flags:
The model underlying the display page tree
- RB.Shell.props.display_page_tree¶
- Name:
display-page-tree
- Type:
- Default Value:
- Flags:
The
RB.DisplayPageTree
instance
- RB.Shell.props.dry_run¶
- Name:
dry-run
- Type:
- Default Value:
- Flags:
If
True
, don’t write back file metadata changes.
- RB.Shell.props.no_registration¶
- Name:
no-registration
- Type:
- Default Value:
- Flags:
If
True
, disable single-instance features.
- RB.Shell.props.no_update¶
- Name:
no-update
- Type:
- Default Value:
- Flags:
If
True
, don’t update the database.
- RB.Shell.props.playlist_manager¶
- Name:
playlist-manager
- Type:
- Default Value:
- Flags:
The
RB.PlaylistManager
instance
- RB.Shell.props.playlists_file¶
- Name:
playlists-file
- Type:
- Default Value:
'playlists.xml'
- Flags:
The path to the playlist file
- RB.Shell.props.prefs¶
- Name:
prefs
- Type:
- Default Value:
- Flags:
The
RB.ShellPreferences
instance
- RB.Shell.props.removable_media_manager¶
- Name:
removable-media-manager
- Type:
- Default Value:
- Flags:
The
RB.RemovableMediaManager
instance
- RB.Shell.props.rhythmdb_file¶
- Name:
rhythmdb-file
- Type:
- Default Value:
'rhythmdb.xml'
- Flags:
The path to the rhythmdb file
- RB.Shell.props.selected_page¶
- Name:
selected-page
- Type:
- Default Value:
- Flags:
The currently selected display page
- RB.Shell.props.shell_player¶
- Name:
shell-player
- Type:
- Default Value:
- Flags:
The
RB.ShellPlayer
instance
- RB.Shell.props.task_list¶
- Name:
task-list
- Type:
- Default Value:
- Flags:
The
RB.TaskList
instance
- RB.Shell.props.track_transfer_queue¶
- Name:
track-transfer-queue
- Type:
- Default Value:
- Flags:
The
RB.TrackTransferQueue
instance
- RB.Shell.props.visibility¶
-
Whether the main window is currently visible.
- RB.Shell.props.window¶
- Name:
window
- Type:
- Default Value:
- Flags:
The main Rhythmbox window.