[rygel/rygel-0-20] media-export: Fix GstDiscoverer error handling



commit 489bb91d9704d914b5185193cb3774fd095cd804
Author: Jens Georg <jensg openismus com>
Date:   Sat Sep 28 17:55:20 2013 +0200

    media-export: Fix GstDiscoverer error handling
    
    The code was ported from old GUPnPDLNADiscoverer code under the assumption
    that the error handling is the same (a bitfield), but it isn't.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=704317

 .../rygel-media-export-metadata-extractor.vala     |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 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 6024cdc..cd9e2ad 100644
--- a/src/plugins/media-export/rygel-media-export-metadata-extractor.vala
+++ b/src/plugins/media-export/rygel-media-export-metadata-extractor.vala
@@ -102,14 +102,21 @@ public class Rygel.MediaExport.MetadataExtractor: GLib.Object {
 
         this.file_hash.unset (info.get_uri ());
 
-        if ((info.get_result () & DiscovererResult.TIMEOUT) != 0) {
-            debug ("Extraction timed out on %s", file.get_uri ());
-            this.extract_basic_information (file, null, null);
+        if (info.get_result () == DiscovererResult.ERROR ||
+            info.get_result () == DiscovererResult.URI_INVALID) {
+            this.error (file, err);
 
             return;
-        } else if ((info.get_result () &
-                    DiscovererResult.ERROR) != 0) {
-            this.error (file, err);
+        } else if (info.get_result () == DiscovererResult.TIMEOUT ||
+                   info.get_result () == DiscovererResult.BUSY ||
+                   info.get_result () == DiscovererResult.MISSING_PLUGINS) {
+            if (info.get_result () == DiscovererResult.MISSING_PLUGINS) {
+                debug ("Plugins are missing for extraction of file %s",
+                       file.get_uri ());
+            } else {
+                debug ("Extraction timed out on %s", file.get_uri ());
+            }
+            this.extract_basic_information (file, null, null);
 
             return;
         }


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