[rygel/wip/didl-s] server: Generate thumbs for native files only
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/wip/didl-s] server: Generate thumbs for native files only
- Date: Tue, 20 Nov 2012 15:29:12 +0000 (UTC)
commit c7c93f0721796217fde08c9b0352a0fa8c2dea4a
Author: Jens Georg <jensg openismus com>
Date: Thu Nov 15 15:41:28 2012 +0100
server: Generate thumbs for native files only
src/librygel-server/rygel-thumbnailer.vala | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/librygel-server/rygel-thumbnailer.vala b/src/librygel-server/rygel-thumbnailer.vala
index 17dfac9..a52c376 100644
--- a/src/librygel-server/rygel-thumbnailer.vala
+++ b/src/librygel-server/rygel-thumbnailer.vala
@@ -69,6 +69,11 @@ internal class Rygel.Thumbnailer : GLib.Object {
public Thumbnail get_thumbnail (string uri, string mime_type) throws Error {
var file = File.new_for_uri (uri);
+ if (!file.is_native ()) {
+ throw new ThumbnailerError.NO_THUMBNAIL
+ (_("Thubmnailing not supported"));
+ }
+
var info = file.query_info (FileAttribute.THUMBNAIL_PATH + "," +
FileAttribute.THUMBNAILING_FAILED,
FileQueryInfoFlags.NONE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]