summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2022-05-08 19:59:19 +0200
committerJens Georg <mail@jensge.org>2022-05-10 20:34:54 +0200
commitae1ebc1dfe961007675dd28b4bd1261831885624 (patch)
tree37e98082df31884b8b8c6766563685d9e55439d1 /src
parentdfb0f3b5682a69c2b547ba9bdca31876d5b50047 (diff)
downloadrygel-ae1ebc1dfe961007675dd28b4bd1261831885624.tar.gz
tracker3: Do not error out if service is missing
Fixes #196
Diffstat (limited to 'src')
-rw-r--r--src/plugins/tracker3/rygel-tracker-plugin-factory.vala2
-rw-r--r--src/plugins/tracker3/rygel-tracker-plugin.vala2
-rw-r--r--src/plugins/tracker3/rygel-tracker-root-container.vala8
3 files changed, 4 insertions, 8 deletions
diff --git a/src/plugins/tracker3/rygel-tracker-plugin-factory.vala b/src/plugins/tracker3/rygel-tracker-plugin-factory.vala
index 06f8149b..2e775af8 100644
--- a/src/plugins/tracker3/rygel-tracker-plugin-factory.vala
+++ b/src/plugins/tracker3/rygel-tracker-plugin-factory.vala
@@ -40,7 +40,7 @@ public void module_init (PluginLoader loader) {
public class Rygel.Tracker.PluginFactory {
PluginLoader loader;
- public PluginFactory (PluginLoader loader) throws IOError, DBusError {
+ public PluginFactory (PluginLoader loader) throws Error {
this.loader = loader;
this.loader.add_plugin (new Tracker.Plugin ());
diff --git a/src/plugins/tracker3/rygel-tracker-plugin.vala b/src/plugins/tracker3/rygel-tracker-plugin.vala
index 6333f208..941ee228 100644
--- a/src/plugins/tracker3/rygel-tracker-plugin.vala
+++ b/src/plugins/tracker3/rygel-tracker-plugin.vala
@@ -28,7 +28,7 @@ public class Rygel.Tracker.Plugin : Rygel.MediaServerPlugin {
private static RootContainer root;
- public Plugin () {
+ public Plugin () throws Error {
if (root == null) {
// translators: @REALNAME@ is substituted for user's real name and it doesn't need translation.
root = new RootContainer (_("@REALNAME@’s media"));
diff --git a/src/plugins/tracker3/rygel-tracker-root-container.vala b/src/plugins/tracker3/rygel-tracker-root-container.vala
index c7f722a8..fc25eac1 100644
--- a/src/plugins/tracker3/rygel-tracker-root-container.vala
+++ b/src/plugins/tracker3/rygel-tracker-root-container.vala
@@ -34,13 +34,9 @@ public class Rygel.Tracker.RootContainer : Rygel.SimpleContainer {
public static Sparql.Connection connection;
- public RootContainer (string title) {
+ public RootContainer (string title) throws Error {
if (RootContainer.connection == null) {
- try {
- RootContainer.connection = Sparql.Connection.bus_new (TRACKER_SERVICE, null);
- } catch (Error err) {
- error ("Failed to connect to tracker: %s", err.message);
- }
+ RootContainer.connection = Sparql.Connection.bus_new (TRACKER_SERVICE, null);
}
base.root (title);