[rygel] core,data: Correct meaning for 'upnp_enabled' config



commit 984085dd7d5531f61215e440918540980a507703
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Fri Dec 17 17:25:49 2010 +0200

    core,data: Correct meaning for 'upnp_enabled' config
    
    'upnp_enabled' in the configuration now really means what it says:
    Enable/Disable the UPnP devices. So its now set to 'true' by default and
    if you set this to 'false', you can still stream media (currently only over
    HTTP) from it. Of course, that means you need to know the URI of the item.

 data/rygel-default.conf   |    6 ++++--
 data/rygel-maemo.conf     |    6 ++++--
 src/rygel/rygel-main.vala |    3 ++-
 3 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/data/rygel-default.conf b/data/rygel-default.conf
index ff332ba..530e650 100644
--- a/data/rygel-default.conf
+++ b/data/rygel-default.conf
@@ -5,8 +5,10 @@
 
 # General configuration options
 [general]
-# Set it to 'true' if Rygel should be run as part of user's session.
-enabled=false
+# Set it to 'false' if you want to only use the streaming part of Rygel and/or
+# don't want it to advertize itself on the UPnP network. If you want to
+# completely disable rygel, just don't run it then. :)
+enabled=true
 
 # Set it to 'false' if you want to disable transcoding support.
 enable-transcoding=true
diff --git a/data/rygel-maemo.conf b/data/rygel-maemo.conf
index 3191b02..3dd4332 100644
--- a/data/rygel-maemo.conf
+++ b/data/rygel-maemo.conf
@@ -5,8 +5,10 @@
 
 # General configuration options
 [general]
-# Set it to 'true' if Rygel should be run as part of user's session.
-enabled=false
+# Set it to 'false' if you want to only use the streaming part of Rygel and/or
+# don't want it to advertize itself on the UPnP network. If you want to
+# completely disable rygel, just don't run it then. :)
+enabled=true
 
 # Set it to 'false' if you want to disable transcoding support.
 enable-transcoding=true
diff --git a/src/rygel/rygel-main.vala b/src/rygel/rygel-main.vala
index fe417e5..1753c2b 100644
--- a/src/rygel/rygel-main.vala
+++ b/src/rygel/rygel-main.vala
@@ -184,7 +184,8 @@ public class Rygel.Main : Object {
         try {
             var device = factory.create (plugin);
 
-            device.available = plugin.active;
+            device.available = plugin.active &&
+                               this.config.get_upnp_enabled ();
 
             this.root_devices.add (device);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]