[rygel] core: Early exit on missing thumbnail
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: Early exit on missing thumbnail
- Date: Tue, 17 Jul 2012 06:46:55 +0000 (UTC)
commit 3c691be0968186468d45abeaf99a43f9f737dd84
Author: Jens Georg <mail jensge org>
Date: Mon Jul 9 13:33:51 2012 +0200
core: Early exit on missing thumbnail
If we need to ask tumbler for a thumbnail, we can just exit. There's no
need to do the filesystem call afterwards. It will fail anyway.
src/librygel-core/rygel-thumbnailer.vala | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/librygel-core/rygel-thumbnailer.vala b/src/librygel-core/rygel-thumbnailer.vala
index 35d5545..db6ea20 100644
--- a/src/librygel-core/rygel-thumbnailer.vala
+++ b/src/librygel-core/rygel-thumbnailer.vala
@@ -107,6 +107,9 @@ internal class Rygel.Thumbnailer : GLib.Object {
// send a request to create thumbnail if it does not exist
if ((this.thumbler != null) && (!file.query_exists ())) {
this.thumbler.queue_thumbnail_task (uri, mime_type);
+
+ throw new ThumbnailerError.NO_THUMBNAIL
+ (_("No thumbnail available"));
}
var info = file.query_info (FileAttribute.ACCESS_CAN_READ + "," +
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]