From bd3015babff9f56500584421e3a3e577d1903506 Mon Sep 17 00:00:00 2001 From: Bastian Germann Date: Mon, 8 Oct 2018 00:05:04 +0200 Subject: [PATCH] Media plugin checks for libmediainfo --- openlp/plugins/media/mediaplugin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openlp/plugins/media/mediaplugin.py b/openlp/plugins/media/mediaplugin.py index 1b3130705..094ea4bec 100644 --- a/openlp/plugins/media/mediaplugin.py +++ b/openlp/plugins/media/mediaplugin.py @@ -25,6 +25,7 @@ The Media plugin import logging import re +from pymediainfo import MediaInfo from PyQt5 import QtCore from openlp.core.api.http import register_endpoint @@ -77,8 +78,8 @@ class MediaPlugin(Plugin): :return: true or false """ log.debug('check_installed Mediainfo') - # Try to find mediainfo in the path - exists = process_check_binary(Path('mediainfo')) + # Try to find libmediainfo or mediainfo in the path + exists = MediaInfo.can_parse() or process_check_binary(Path('mediainfo')) # If mediainfo is not in the path, try to find it in the application folder if not exists: exists = process_check_binary(AppLocation.get_directory(AppLocation.AppDir) / 'mediainfo')