[rygel] media-export: Make harvesting of metadata optional
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] media-export: Make harvesting of metadata optional
- Date: Mon, 7 Jun 2010 14:27:10 +0000 (UTC)
commit 9dd46422f2bc96cc6629d3491a8d4ed66371f08b
Author: Jens Georg <mail jensge org>
Date: Fri May 14 23:14:28 2010 +0200
media-export: Make harvesting of metadata optional
This commit introduces a new boolean configuration setting called
"extract-metadata" which disables harvesting completely. If not
configured, it defaults to "false"
This will also renders virtual folders useless since those are based on
metadata.
.../rygel-media-export-metadata-extractor.vala | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-metadata-extractor.vala b/src/plugins/media-export/rygel-media-export-metadata-extractor.vala
index 03b3033..7c83a1c 100644
--- a/src/plugins/media-export/rygel-media-export-metadata-extractor.vala
+++ b/src/plugins/media-export/rygel-media-export-metadata-extractor.vala
@@ -107,8 +107,18 @@ public class Rygel.MediaExport.MetadataExtractor: GLib.Object {
}
public static MetadataExtractor? create() {
- if (factory == null) {
- debug ("Checking for gstreamer element 'playbin'...");
+ var config = MetaConfig.get_default ();
+ bool extract_metadata;
+
+ try {
+ extract_metadata = config.get_bool ("MediaExport",
+ "extract-metadata");
+ } catch (Error error) {
+ extract_metadata = false;
+ }
+
+ if (factory == null && extract_metadata) {
+ debug ("Checking for gstreamer element 'playbin'..."));
var factory = ElementFactory.find("playbin2");
if (factory != null) {
debug (_("Using playbin2"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]