[PATCH 2/2] Accept network paths in ffmpeg thumbnailer plugin
Evangelos Foutras
evangelos at foutrelis.com
Sun Jun 10 22:38:32 CEST 2018
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
More information about the Xfce4-dev
mailing list