From 7670feff1b7ae28c1a04281c567c6c738eb9f44d Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Sun, 10 Jun 2018 22:01:39 +0300 Subject: [PATCH] Accept network paths in ffmpeg thumbnailer plugin g_file_get_path() appears to be able to convert smb://, sftp://, and other GVFS schemes to local absolute paths which can be passed as is to ffmpegthumbnailer. In order to handle these URIs, remove the call to g_file_is_native() and rely exclussively on g_file_get_path(). --- plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer.c b/plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer.c index 04cbb9d..81f2922 100644 --- a/plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer.c +++ b/plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer.c @@ -196,14 +196,11 @@ ffmpeg_thumbnailer_create (TumblerAbstractThumbnailer *thumbnailer, uri = tumbler_file_info_get_uri (info); - /* try to open the source file for reading */ + /* get the local absolute path to the source file */ file = g_file_new_for_uri (uri); + path = g_file_get_path (file); - if (g_file_is_native (file)) - { - path = g_file_get_path (file); - } - else + if (path == NULL) { /* there was an error, emit error signal */ g_set_error (&error, TUMBLER_ERROR, TUMBLER_ERROR_INVALID_FORMAT, -- 2.17.1