Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--url_image_preview/url_image_preview.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/url_image_preview/url_image_preview.py b/url_image_preview/url_image_preview.py
index 582c957..5c84827 100644
--- a/url_image_preview/url_image_preview.py
+++ b/url_image_preview/url_image_preview.py
@@ -29,11 +29,13 @@ from gi.repository import GdkPixbuf
from gi.repository import Gio
from gi.repository import GLib
from gi.repository import Soup
+HAS_GSTPBUTILS = False
try:
gi.require_version('Gst', '1.0')
gi.require_version('GstPbutils', '1.0')
from gi.repository import Gst
from gi.repository import GstPbutils
+ HAS_GSTPBUTILS = True
except Exception:
pass
@@ -728,6 +730,9 @@ class UrlImagePreviewPlugin(GajimPlugin):
@staticmethod
def _contains_audio_streams(file_path):
+ if not HAS_GSTPBUTILS:
+ return False
+
# Check if it is really an audio file
has_audio = False
discoverer = GstPbutils.Discoverer()