[rygel] media-export: Signalize metadata extraction error only once.
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] media-export: Signalize metadata extraction error only once.
- Date: Wed, 30 Jan 2013 13:51:51 +0000 (UTC)
commit e9a6cc4e5f3c3cf2c330ef1f88e6571554b365f3
Author: Krzesimir Nowak <krnowak openismus com>
Date: Wed Jan 30 14:46:30 2013 +0100
media-export: Signalize metadata extraction error only once.
.../rygel-media-export-metadata-extractor.vala | 43 +++++++++-----------
1 files changed, 19 insertions(+), 24 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 11cded1..ac4d3f7 100644
--- a/src/plugins/media-export/rygel-media-export-metadata-extractor.vala
+++ b/src/plugins/media-export/rygel-media-export-metadata-extractor.vala
@@ -118,44 +118,39 @@ public class Rygel.MediaExport.MetadataExtractor: GLib.Object {
this.extract_basic_information (file, info, dlna);
}
- private void extract_basic_information
- (File file,
- DiscovererInfo? info,
- GUPnPDLNA.Profile? dlna) {
- try {
- FileInfo file_info;
+ private void extract_basic_information (File file,
+ DiscovererInfo? info,
+ GUPnPDLNA.Profile? dlna) {
+ FileInfo file_info;
- try {
- file_info = file.query_info
- (FileAttribute.STANDARD_CONTENT_TYPE
+ try {
+ file_info = file.query_info (FileAttribute.STANDARD_CONTENT_TYPE
+ "," +
FileAttribute.STANDARD_SIZE + "," +
FileAttribute.TIME_MODIFIED + "," +
FileAttribute.STANDARD_DISPLAY_NAME,
FileQueryInfoFlags.NONE,
null);
- } catch (Error error) {
- warning (_("Failed to query content type for '%s'"),
- file.get_uri ());
-
- // signal error to parent
- this.error (file, error);
-
- throw error;
- }
-
- this.extraction_done (file,
- info,
- dlna,
- file_info);
} catch (Error error) {
+ var uri = file.get_uri ();
+
+ warning (_("Failed to query content type for '%s'"),
+ uri);
debug ("Failed to extract basic metadata from %s: %s",
- file.get_uri (),
+ uri,
error.message);
+
+ // signal error to parent
this.error (file, error);
+ return;
}
+ this.extraction_done (file,
+ info,
+ dlna,
+ file_info);
}
+
private void on_config_changed (Configuration config,
string section,
string key) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]