[rygel] media-export: Ignore unknown file from discoverer
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] media-export: Ignore unknown file from discoverer
- Date: Sun, 1 May 2011 12:38:00 +0000 (UTC)
commit 431b26efbe22efe2d3944787a3fb035de39b7e5b
Author: Jens Georg <mail jensge org>
Date: Sat Apr 23 13:57:54 2011 +0300
media-export: Ignore unknown file from discoverer
Sometimes and for some files the discoverer seems to send multiple
events.
.../rygel-media-export-metadata-extractor.vala | 8 ++++++--
1 files changed, 6 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 991d990..14b325a 100644
--- a/src/plugins/media-export/rygel-media-export-metadata-extractor.vala
+++ b/src/plugins/media-export/rygel-media-export-metadata-extractor.vala
@@ -96,9 +96,13 @@ public class Rygel.MediaExport.MetadataExtractor: GLib.Object {
private void on_done (GUPnP.DLNAInformation dlna,
GLib.Error err) {
- assert (this.file_hash.has_key (dlna.info.get_uri ()));
-
var file = this.file_hash.get (dlna.info.get_uri ());
+ if (file == null) {
+ warning ("File %s already handled, ignoring event",
+ dlna.info.get_uri ());
+
+ return;
+ }
this.file_hash.unset (dlna.info.get_uri ());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]