[rygel] core: Make it possible to set UDN
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: Make it possible to set UDN
- Date: Sat, 27 Aug 2016 14:49:27 +0000 (UTC)
commit 202fcfc366c3264481ba468010b0042b34ca58e8
Author: Jens Georg <mail jensge org>
Date: Sat Aug 27 16:49:07 2016 +0200
core: Make it possible to set UDN
Signed-off-by: Jens Georg <mail jensge org>
src/librygel-core/rygel-root-device-factory.vala | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/librygel-core/rygel-root-device-factory.vala
b/src/librygel-core/rygel-root-device-factory.vala
index 5e8fe36..0750b17 100644
--- a/src/librygel-core/rygel-root-device-factory.vala
+++ b/src/librygel-core/rygel-root-device-factory.vala
@@ -137,7 +137,14 @@ public class Rygel.RootDeviceFactory : Object,
}
var udn = file.get_udn ();
if (udn == null || udn == "") {
- file.set_udn ("uuid:" + GUPnP.get_uuid ());
+ // Check if we have a fixed UUID for this plugin
+ try {
+ var config = MetaConfig.get_default ();
+ udn = config.get_string (plugin.name, "uuid");
+ } catch (Error error) {
+ udn = GUPnP.get_uuid ();
+ }
+ file.set_udn ("uuid:" + udn);
}
file.save (desc_path);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]