### Method

# RB Shell load_uri

#### Declaration [src]

    gboolean
    rb_shell_load_uri (
      RBShell* shell,
      const char* uri,
      gboolean play,
      GError** error
    )

#### Description [src]

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.

#### Parameters

`uri`

  Type: `const char*`

  The URI to load.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`play`

  Type: `gboolean`

  If TRUE, start playing the URI (if possible).

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the method if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `gboolean`

TRUE if the URI was added successfully.