diff options
author | Jens Georg <mail@jensge.org> | 2010-10-19 13:27:54 +0200 |
---|---|---|
committer | Zeeshan Ali (Khattak) <zeeshanak@gnome.org> | 2010-11-15 14:18:54 +0200 |
commit | 92d71f76229ed48f51a8ccccd23f699c7aee915b (patch) | |
tree | 6c18a951c8444065fe73e2ff81877a8a43e2bfb6 | |
parent | e844926018dc19f3230fb5cf9330612a88281db6 (diff) | |
download | rygel-92d71f76229ed48f51a8ccccd23f699c7aee915b.tar.gz |
media-export: Use simple mode fallback
If files are not discoverable, use simple mode for that file
-rw-r--r-- | src/plugins/media-export/rygel-media-export-harvesting-task.vala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/plugins/media-export/rygel-media-export-harvesting-task.vala b/src/plugins/media-export/rygel-media-export-harvesting-task.vala index a4c8675f..d6aa881f 100644 --- a/src/plugins/media-export/rygel-media-export-harvesting-task.vala +++ b/src/plugins/media-export/rygel-media-export-harvesting-task.vala @@ -327,6 +327,23 @@ public class Rygel.MediaExport.HarvestingTask : Rygel.StateMachine, GLib.Object return; } + try { + var info = file.query_info (HARVESTER_ATTRIBUTES, + FileQueryInfoFlags.NONE, + this.cancellable); + string content_type = info.get_content_type (); + string mime = g_content_type_get_mime_type (content_type); + uint64 size = info.get_size (); + uint64 mtime = info.get_attribute_uint64 ( + FILE_ATTRIBUTE_TIME_MODIFIED); + this.on_extracted_cb (file, null, mime, size, mtime); + } catch (Error error) { + debug ("Could not get basic file information for %s: %s." + + "Ignoring", + file.get_uri (), + error.message); + } + this.files.poll (); this.do_update (); } |