Functions¶
Details¶
- RB.builder_boldify_label(builder, name)¶
- Parameters:
builder (
Gtk.Builder
) – aGtk.Builder
instancename (
str
) – name of the label to boldify
Makes a label built from a
Gtk.Builder
file bold.
- RB.builder_load(file, user_data)¶
- Parameters:
- Returns:
Gtk.Builder
object built from the file- Return type:
Locates and reads a
Gtk.Builder
file, automatically connecting signal handlers where possible.The caller can specify an absolute path to the file, a resource path starting with /org/gnome/Rhythmbox/ or just a filename. The file will be loaded from GResources.
- RB.builder_load_plugin_file(plugin, file, user_data)¶
- Parameters:
plugin (
GObject.Object
) – #RBPlugin instancefile (
str
) – name of file to loaduser_data (
object
orNone
) – user data to pass to autoconnected signal handlers
- Returns:
Gtk.Builder
object built from the file- Return type:
Like
RB.builder_load
, except it finds files associated with plugins as well as those in the core data directories.
- RB.canonicalise_uri(uri)¶
- Parameters:
uri (
str
) – URI to canonicalise- Returns:
canonical URI, must be freed by caller
- Return type:
Converts uri to canonical URI form, ensuring it doesn’t contain any redundant directory fragments or unnecessarily escaped characters. All URIs passed to
RB.RhythmDB
functions should be canonicalised.
- RB.check_dir_has_space(dir, bytes_needed)¶
- Parameters:
- Returns:
True
if enough space is available.- Return type:
Checks that the filesystem holding file has at least bytes_needed bytes available.
- RB.check_dir_has_space_uri(uri, bytes_needed)¶
- Parameters:
- Returns:
True
if enough space is available.- Return type:
Checks that the filesystem holding uri has at least bytes_needed bytes available.
- RB.combo_box_hyphen_separator_func(model, iter, data)¶
- Parameters:
model (
Gtk.TreeModel
) – aGtk.TreeModel
iter (
Gtk.TreeIter
) – aGtk.TreeIter
- Returns:
True
if the row pointed to by iter is a separator- Return type:
A row separator function to use for
Gtk.ComboBox
widgets. It expects the model to contain a string in its first column, and interprets a string containing a single hyphen character as a separator.
- RB.compare_gtimeval(a, b)¶
- Parameters:
a (
GLib.TimeVal
) – left hand sideb (
GLib.TimeVal
) – right hand size
- Returns:
-1 if a < b, 0 if a == b, 1 if a > b
- Return type:
Compares two
GLib.TimeVal
structures for sorting.
- RB.debug_get_args()¶
- Returns:
debug output arguments, must be freed with
GLib.strfreev
()- Return type:
[
str
]
Constructs arguments to pass to another process using this debug output code that will produce the same debug output settings.
- RB.debug_init(debug)¶
-
Sets up debug output, with either all debug enabled or none.
- RB.debug_init_match(match)¶
- Parameters:
match (
str
) – string to match functions and filenames against
Sets up debug output, enabling debug output from file and function names that contain the specified match string.
Also sets up a GLib log handler that will trigger a debugger break for critical or warning level output if any debug output at all is enabled.
- RB.debug_matches(func, file)¶
- Parameters:
- Returns:
True
if matched- Return type:
Checks if file or func matches the current debug output settings.
- RB.debug_real(func, file, line, newline, message)¶
- Parameters:
If the debug output settings match the function or file names, the debug message will be formatted and written to standard error.
- RB.debug_stop_in_debugger()¶
Raises a SIGINT signal to get the attention of the debugger. When not running under the debugger, we don’t want to stop, so we ignore the signal for just the moment that we raise it.
- RB.device_source_uri_is_source(source, uri)¶
- Parameters:
source (
RB.Source
) – aRB.DeviceSource
uri (
str
) – a URI to check
- Returns:
True
if uri matches source- Return type:
Returns
True
if uri matches source. This should be used to implement the uri_is_sourceRB.Source
method.
- RB.device_source_want_uri(source, uri)¶
- Parameters:
source (
RB.Source
) – aRB.DeviceSource
uri (
str
) – a URI to consider
- Returns:
URI match strength
- Return type:
Checks whether uri identifies a path underneath the device’s mount point. Should be used to implement the
RB.Source
want_uri method.
- RB.encoder_new()¶
- Returns:
the new
RB.Encoder
- Return type:
Creates a new
RB.Encoder
instance.
- RB.ext_db_key_create_lookup(field, value)¶
- Parameters:
- Returns:
the new key
- Return type:
Creates a new metadata lookup key with a single field. Use rb_ext_db_key_add_field to add more.
- RB.ext_db_key_create_storage(field, value)¶
- Parameters:
- Returns:
the new key
- Return type:
Creates a new metadata storage key with a single field. Use rb_ext_db_key_add_field to add more.
- RB.file(filename)¶
- Parameters:
filename (
str
) – name of file to search for- Returns:
Full file name, if found. Must not be freed.
- Return type:
Searches for an installed file, returning the full path name if found,
None
otherwise.
- RB.file_chooser_new(title, parent, action, local_only)¶
- Parameters:
title (
str
) – title for the file chooserparent (
Gtk.Window
) – parentGtk.Window
for the file chooseraction (
Gtk.FileChooserAction
) – theGtk.FileChooserAction
- Returns:
the file chooser
Gtk.Widget
- Return type:
Creates and shows a regular gtk+ file chooser dialog with a given title. The user’s music directory (typically ~/Music) is added as a shortcut.
For consistency, this should be used anywhere a file chooser is required.
After creating the dialog, the caller should connect a handler to its ‘response’ signal to process the user’s selected files or folders.
- RB.file_find_extant_parent(file)¶
- Parameters:
- Returns:
Gio.File
for the nearest extant ancestor- Return type:
Walks up the filesystem hierarchy to find a
Gio.File
representing the nearest extant ancestor of the specified file, which may be the file itself if it exists.
- RB.file_helpers_init()¶
Sets up file search paths for rb_file. Must be called on startup.
- RB.file_helpers_shutdown()¶
Frees various data allocated by file helper functions. Should be called on shutdown.
- RB.file_resolve_symlink(file)¶
- Parameters:
file (
Gio.File
) – the file to process- Raises:
- Returns:
a
Gio.File
representing the canonical location, orNone
on error- Return type:
Attempts to resolve symlinks leading to file and return a canonical location.
- RB.find_plugin_data_file(plugin, name)¶
- Parameters:
plugin (
GObject.Object
) – the plugin objectname (
str
) – name of the file to find
- Returns:
allocated string containing the location of the file
- Return type:
Locates a file under the plugin’s data directory.
- RB.find_plugin_resource(plugin, name)¶
- Parameters:
plugin (
GObject.Object
) – the plugin objectname (
str
) – name of the file to find
- Returns:
allocated string containing the resource path
- Return type:
Constructs a resource path for a plugin data file.
- RB.find_user_cache_file(name)¶
- Parameters:
name (
str
) – name of file to find- Returns:
allocated string containing the location of the file to use, even if an error occurred.
- Return type:
Determines the full path to use for user-specific cached files within the user cache directory.
- RB.find_user_data_file(name)¶
- Parameters:
name (
str
) – name of file to find- Returns:
allocated string containing the location of the file to use, even if an error occurred.
- Return type:
Determines the full path to use for user-specific files, such as rhythmdb.xml, within the user data directory (see rb_user_data_dir).
- RB.gst_add_filter(player, filterbin, element, use_pad_block)¶
- Parameters:
player (
RB.Player
) – player object (must implement RBPlayerGstFilter interface)filterbin (
Gst.Element
) – the filter binelement (
Gst.Element
) – the filter to adduse_pad_block (
bool
) – ifTrue
, block the src pad connected to the filter bin
- Return type:
Inserts a filter into the filter bin, using pad blocking (if requested) to avoid breaking the data flow. Pad blocking should be used when the pipeline is in PLAYING state, or when in PAUSED state where a streaming thread will be holding the stream lock for the filter bin.
- RB.gst_add_tee(player, tee, element, use_pad_block)¶
- Parameters:
player (
RB.Player
) – player object (must implement RBPlayerGstTee interface)tee (
Gst.Element
) – a tee elementelement (
Gst.Element
) – the tee branch to adduse_pad_block (
bool
) – ifTrue
, block the src pad connected to the filter bin
- Return type:
Attaches a branch to the tee, using pad blocking (if requested) to avoid breaking the data flow. Pad blocking should be used when the pipeline is in PLAYING state, or when in PAUSED state where a streaming thread will be holding the stream lock for the filter bin.
- RB.gst_create_filter_bin()¶
- Returns:
filter bin
- Return type:
Creates an initial bin to use for dynamically plugging filter elements into the pipeline.
- RB.gst_encoder_set_encoding_style(element, style)¶
- Parameters:
element (
Gst.Element
) –style (
str
) –
- Return type:
- RB.gst_encoding_profile_get_encoder(profile)¶
- Parameters:
profile (
GstPbutils.EncodingProfile
) – aGstPbutils.EncodingProfile
- Returns:
an encoder element instance
- Return type:
- RB.gst_encoding_profile_get_encoder_caps(profile)¶
- Parameters:
profile (
GstPbutils.EncodingProfile
) – aGstPbutils.EncodingProfile
- Returns:
output caps for the encoder
- Return type:
- RB.gst_encoding_profile_get_media_type(profile)¶
- Parameters:
profile (
GstPbutils.EncodingProfile
) –- Return type:
- RB.gst_encoding_profile_get_presets(profile)¶
- Parameters:
profile (
GstPbutils.EncodingProfile
) – profile to return presets for- Returns:
preset names
- Return type:
[
int
]
- RB.gst_encoding_profile_get_settings(profile, style)¶
- Parameters:
profile (
GstPbutils.EncodingProfile
) – aGstPbutils.EncodingProfile
- Returns:
list of settings
- Return type:
[
str
]
Returns a list of settings for the profile profile that can usefully be exposed to a user. This usually means just bitrate/quality settings. This works by finding the name of the encoder element for the profile and retrieving a list specific to that encoder.
- RB.gst_encoding_profile_set_preset(profile, preset)¶
- Parameters:
profile (
GstPbutils.EncodingProfile
) – aGstPbutils.EncodingProfile
preset (
str
) – preset to apply
Applies the preset preset to the audio encoding profile within profile.
- RB.gst_error_get_error_code(error)¶
- Parameters:
error (
GLib.Error
) – error received from GStreamer- Returns:
the
RB.PlayerError
value to use- Return type:
Maps a GStreamer error to an
RB.PlayerError
error code.
- RB.gst_get_default_encoding_target()¶
- Returns:
default encoding target
- Return type:
- RB.gst_get_encoding_profile(media_type)¶
- Parameters:
media_type (
str
) – media type to get a profile for- Returns:
encoding profile
- Return type:
- RB.gst_get_missing_plugin_type(structure)¶
- Parameters:
structure (
Gst.Structure
) –- Return type:
- RB.gst_media_type_matches_profile(profile, media_type)¶
- Parameters:
profile (
GstPbutils.EncodingProfile
) –media_type (
str
) –
- Return type:
- RB.gst_process_embedded_image(taglist, tag)¶
- Parameters:
taglist (
Gst.TagList
) – aGst.TagList
containing an imagetag (
str
) – the tag name
- Returns:
a
GdkPixbuf.Pixbuf
, orNone
.- Return type:
Converts embedded image data extracted from a tag list into a
GdkPixbuf.Pixbuf
. The returnedGdkPixbuf.Pixbuf
is owned by the caller.
- RB.gst_process_tag_string(taglist, tag, field, value)¶
- Parameters:
taglist (
Gst.TagList
) – aGst.TagList
containing a string tagtag (
str
) – tag namefield (
RB.MetaDataField
) – returns theRB.MetaDataField
corresponding to the tagvalue (
GObject.Value
) – returns the tag value
- Returns:
True
if the tag was successfully converted.- Return type:
Processes a tag string, determining the metadata field identifier corresponding to the tag name, and converting the tag data into the appropriate value type.
- RB.gst_remove_filter(player, filterbin, element, use_pad_block)¶
- Parameters:
player (
RB.Player
) – player object (must implement RBPlayerGstFilter interface)filterbin (
Gst.Element
) – the filter binelement (
Gst.Element
) – the filter to removeuse_pad_block (
bool
) – ifTrue
, block the src pad connected to the filter bin
- Return type:
Removes a filter from the filter bin, using pad blocking (if requested) to avoid breaking the data flow. Pad blocking should be used when the pipeline is in PLAYING state, or when in PAUSED state where a streaming thread will be holding the stream lock for the filter bin.
- RB.gst_remove_tee(player, tee, element, use_pad_block)¶
- Parameters:
player (
RB.Player
) – player object (must implement RBPlayerGstTee interface)tee (
Gst.Element
) – a tee elementelement (
Gst.Element
) – the tee branch to removeuse_pad_block (
bool
) – ifTrue
, block the src pad connected to the filter bin
- Return type:
Removes a branch from the tee, using pad blocking (if requested) to avoid breaking the data flow. Pad blocking should be used when the pipeline is in PLAYING state, or when in PAUSED state where a streaming thread will be holding the stream lock for the filter bin.
- RB.is_main_thread()¶
-
Checks if currently executing on the main thread.
- RB.locale_dir()¶
- Returns:
locale dir
- Return type:
Returns the locale directory identified at build configuration time.
- RB.make_duration_string(duration)¶
-
Constructs a string describing the specified duration. The string describes hours, minutes, and seconds, and its format is localised.
- RB.make_elapsed_time_string(elapsed, duration, show_remaining)¶
- Parameters:
- Returns:
elapsed/remaining time string
- Return type:
Constructs a string describing a playback position. The string describes hours, minutes, and seconds, and its format is localised. The string can describe either the elapsed time or the time remaining.
- RB.make_time_string(seconds)¶
-
Constructs a string describing the specified time.
- Parameters:
menu (
Gio.Menu
) – menu to updatelink_attr (
str
) – attribute indicating the menu link to updatetarget (
Gio.MenuModel
) – new menu link target
Updates a submenu link to point to the specified target menu.
- RB.music_dir()¶
- Returns:
user’s music directory. must not be freed.
- Return type:
Returns the default directory for the user’s music library. This will usually be the ‘Music’ directory under the home directory.
- RB.player_gst_find_element_with_property(element, property)¶
- Parameters:
element (
Gst.Element
) – element to searchproperty (
str
) – name of property to search for
- Returns:
element instance, or
None
if not found- Return type:
Finds an element inside element that has a property with the specified name.
- RB.player_gst_try_audio_sink(plugin_name, name)¶
- Parameters:
- Returns:
element instance, or
None
- Return type:
Creates and tests an instance of the specified audio sink.
- RB.player_new(want_crossfade)¶
- Parameters:
want_crossfade (
bool
) – ifTrue
, try to use a backend that supports crossfading and other track transitions.- Raises:
- Returns:
new player object.
- Return type:
Creates a new player object.
- RB.podcast_parse_channel_copy(data)¶
- Parameters:
data (
RB.PodcastChannel
) –- Return type:
- RB.podcast_parse_channel_new()¶
- Return type:
- RB.podcast_parse_channel_ref(data)¶
- Parameters:
data (
RB.PodcastChannel
) –- Return type:
- RB.podcast_parse_channel_unref(data)¶
- Parameters:
data (
RB.PodcastChannel
) –
- RB.podcast_parse_item_copy(data)¶
- Parameters:
data (
RB.PodcastItem
) –- Return type:
- RB.podcast_parse_item_free(data)¶
- Parameters:
data (
RB.PodcastItem
) –
- RB.refstring_equal(ap, bp)¶
- Parameters:
ap (
object
orNone
) – anRB.RefString
- Returns:
True
if the strings are the same- Return type:
Key equality function suitable for use with
GLib.HashTable
. Equality checks forRB.RefString
are just pointer comparisons, since there can only be one refstring for a given string.
- RB.refstring_find(init)¶
- Parameters:
init (
str
) – string to find- Returns:
existing
RB.RefString
, orNone
- Return type:
Returns an existing
RB.RefString
for init if one exists, otherwise returnsNone
. If an existing refstring is found, its reference count is increased.
- RB.refstring_hash(p)¶
- Parameters:
p (
object
orNone
) – anRB.RefString
- Returns:
hash value for the string underlying p
- Return type:
Hash function suitable for use with GHashTable.
- RB.refstring_system_init()¶
Sets up the refstring system. Called on startup.
- RB.refstring_system_shutdown()¶
Frees all data associated with the refstring system. Only called on shutdown.
- RB.rhythmbox_get_resource()¶
- Return type:
- RB.rhythmdb_query_get_type()¶
- Return type:
- RB.sanitize_path_for_msdos_filesystem(path)¶
- Parameters:
path (
str
) – a path segment to sanitize (modified in place)
Modifies path such that it represents a legal path for MS DOS filesystems. Note that it replaces forward slash characters, so it’s only appropriate for use with individual path segments rather than entire paths.
- RB.sanitize_uri_for_filesystem(uri, filesystem)¶
- Parameters:
- Returns:
sanitized copy of uri, must be freed by caller.
- Return type:
Removes characters from uri that are not allowed by the filesystem on which it would be stored, or a specific type of filesystem if specified. At present, this only supports MS DOS filesystems.
- RB.scale_pixbuf_to_size(pixbuf, size)¶
- Parameters:
pixbuf (
GdkPixbuf.Pixbuf
) – theGdkPixbuf.Pixbuf
containing the original imagesize (
Gtk.IconSize
) – a stock icon size
- Returns:
scaled
GdkPixbuf.Pixbuf
- Return type:
Creates a new
GdkPixbuf.Pixbuf
from the original one, for a target of size, respecting the aspect ratio of the image.
- RB.search_fold(original)¶
-
Returns a case-folded and punctuation-stripped version of original, useful for performing text searches.
- RB.set_tree_view_column_fixed_width(treeview, column, renderer, strings, padding)¶
- Parameters:
treeview (
Gtk.Widget
) – theGtk.TreeView
containing the columncolumn (
Gtk.TreeViewColumn
) – theGtk.TreeViewColumn
to sizerenderer (
Gtk.CellRenderer
) – theGtk.CellRenderer
used in the columnstrings ([
str
]) – aNone
-terminated set of strings to base the size onpadding (
int
) – a small amount of extra padding for the column
Sets a fixed size for a tree view column based on a set of strings to be displayed in the column.
- RB.settings_delayed_sync(settings, sync_func, *data)¶
- Parameters:
settings (
Gio.Settings
) –Gio.Settings
instancesync_func (
RB.DelayedSyncFunc
orNone
) – function to call
Synchronizes settings in the settings instance after 500ms has elapsed with no further changes.
- RB.shell_error_quark()¶
- Returns:
shell error #GQuark
- Return type:
Returns the #GQuark used for
RB.Shell
errors
- RB.stock_icons_init()¶
Initializes the stock icons, adding the necessary filesystem locations to the GTK icon search path. Must be called on startup.
- RB.stock_icons_shutdown()¶
If anything was necessary to clean up the stock icons, this function would do it. Doesn’t do anything, but should be called on shutdown anyway.
- RB.string_split_words(string)¶
- Parameters:
string (
str
) – the string to split- Returns:
None
-terminated array of strings- Return type:
[
str
]
Splits string on word boundaries using Unicode character definitions.
- RB.uri_append_path(uri, path)¶
- Parameters:
- Returns:
new URI, must be freed by caller
- Return type:
Creates a new URI consisting of path appended to uri.
- RB.uri_append_uri(uri, fragment)¶
- Parameters:
- Returns:
new URI, must be freed by caller
- Return type:
Creates a new URI consisting of fragment appended to uri. Generally isn’t a good idea.
- RB.uri_could_be_podcast(uri, is_opml)¶
- Parameters:
- Returns:
True
if uri may be a podcast- Return type:
Checks if uri identifies a resource that is probably a podcast (RSS or Atom feed). This does not perform any IO, it just guesses based on the URI itself.
- RB.uri_create_parent_dirs(uri)¶
- Parameters:
uri (
str
) – a URI for which to create parent directories- Raises:
- Returns:
True
if successful- Return type:
Ensures that all parent directories of uri exist so that uri itself can be created directly.
- RB.uri_exists(uri)¶
-
Checks if a URI identifies a resource that exists
- RB.uri_get_dir_name(uri)¶
- Parameters:
uri (
str
) – a URI- Returns:
new URI for parent of uri, must be freed by caller.
- Return type:
Returns the directory component of uri, that is, everything up to the start of the filename.
- RB.uri_get_filesystem_type(uri, mount_point)¶
- Parameters:
- Returns:
filesystem type string, must be freed by caller.
- Return type:
Returns a string describing the type of the filesystem containing uri.
- RB.uri_get_mount_point(uri)¶
- Parameters:
uri (
str
) – a URI- Returns:
filesystem mount point (must be freed by caller) or
None
.- Return type:
Returns the mount point of the filesystem holding uri. If uri is on a normal filesystem mount (such as /, /home, /var, etc.) this will be
None
.
- RB.uri_get_short_path_name(uri)¶
- Parameters:
uri (
str
) – a URI- Returns:
filename component of uri, must be freed by caller
- Return type:
Returns the filename component of uri, that is, everything after the final slash and before the start of the query string or fragment.
- RB.uri_handle_recursively(uri, cancel, func, *user_data)¶
- Parameters:
uri (
str
) – URI to visitcancel (
Gio.Cancellable
orNone
) – an optionalGio.Cancellable
to allow cancellationfunc (
RB.UriRecurseFunc
) – Callback function
Calls func for each file found under the directory identified by uri. If uri identifies a file, calls func for that instead.
- RB.uri_handle_recursively_async(uri, cancel, func, *user_data)¶
- Parameters:
uri (
str
) – the URI to visitcancel (
Gio.Cancellable
orNone
) – aGio.Cancellable
to allow cancellationfunc (
RB.UriRecurseFunc
) – callback function
Calls func for each file found under the directory identified by uri, or if uri identifies a file, calls it once with that.
If non-
None
, destroy_data will be called once all files have been processed, or when the operation is cancelled.
- RB.uri_is_descendant(uri, ancestor)¶
- Parameters:
- Returns:
True
if uri is a descendant of ancestor- Return type:
Checks if uri refers to a path beneath ancestor, such that removing some number of path segments of uri would result in ancestor. It doesn’t do any filesystem operations, it just looks at the URIs as strings. The URI strings should be built by looking at a filesystem rather than user input, and must not have path segments that are empty (multiple slashes) or ‘.’ or ‘..’.
Given this input, checking if one URI is a descendant of another is pretty simple. A descendant URI must have the ancestor as a prefix, and if the ancestor ends with a slash, there must be at least one character after that, otherwise the following character must be a slash with at least one character after it.
- RB.uri_is_directory(uri)¶
-
Checks if uri identifies a directory.
-
Checks if uri is hidden, according to the Unix filename convention. If the filename component of uri begins with a dot, the file is considered hidden.
- RB.uri_is_local(uri)¶
-
Checks if uri identifies a local resource. Currently this just checks that it uses the ‘file’ URI scheme.
- RB.uri_is_readable(uri)¶
-
Checks if the user can read the resource identified by uri
- RB.uri_is_writable(uri)¶
-
Checks if the user can write to the resource identified by uri
- RB.uri_list_parse(uri_list)¶
- Parameters:
uri_list (
str
) – string containing URIs to parse- Returns:
GLib.List
of URI strings- Return type:
[
str
]
Converts a single string containing a list of URIs into a
GLib.List
of URI strings.
- Parameters:
uri (
str
) – a URI to construct a hidden version of- Returns:
hidden URI, must be freed by the caller.
- Return type:
Constructs a URI that is similar to uri but which identifies a hidden file. This can be used for temporary files that should not be visible to the user while they are in use.
- RB.uri_mkstemp(prefix, uri_ret, stream)¶
- Parameters:
prefix (
str
) – URI prefixuri_ret (
str
) – returns the temporary file URIstream (
Gio.OutputStream
) – returns a GOutputStream for the temporary file
- Raises:
- Returns:
True
if successful- Return type:
Creates a temporary file whose URI begins with prefix, returning the file URI and an output stream for writing to it.
- RB.uri_resolve_symlink(uri)¶
- Parameters:
uri (
str
) – the URI to process- Raises:
- Returns:
resolved URI, or
None
on error- Return type:
Attempts to resolve symlinks in uri and return a canonical URI for the file it identifies.
- RB.user_cache_dir()¶
- Returns:
string holding the path to the rhythmbox user cache directory, or
None
if the directory does not exist and could not be created.- Return type:
This will create the rhythmbox user cache directory, using the XDG Base Directory specification. If none of the XDG environment variables are set, this will be ~/.cache/rhythmbox.
- RB.user_data_dir()¶
- Returns:
string holding the path to the rhythmbox user data directory, or
None
if the directory does not exist and cannot be created.- Return type:
This will create the rhythmbox user data directory, using the XDG Base Directory specification. If none of the XDG environment variables are set, this will be ~/.local/share/rhythmbox.