summaryrefslogtreecommitdiff
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:33:34 +0200
commit588fe978c069ecaa8e253ab4cd44aca8a897e813 (patch)
treea74a7d249782f31f7f081d531b1d35dd80af2cf4
parent09eea5b4484a10429b17123c957d10433f15d013 (diff)
downloadrygel-588fe978c069ecaa8e253ab4cd44aca8a897e813.tar.gz
tracker3: Do not error out if service is missing
Fixes #196
-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);