diff --git a/resources/images/alerticon.png b/resources/images/alerticon.png new file mode 100644 index 0000000..c3cc0f2 Binary files /dev/null and b/resources/images/alerticon.png differ diff --git a/resources/lib/makemkv.py b/resources/lib/makemkv.py index 9d638ef..b828792 100644 --- a/resources/lib/makemkv.py +++ b/resources/lib/makemkv.py @@ -98,4 +98,16 @@ class MakeMkvInteraction: self.log.info('Windows call successful') except: pass + + def makeMkvExists(self): + (fin, fout) = os.popen4('%s -r' %(self.settings.mkvLocation)) + result = fout.read() + self.log.info('Make mkv check returned %s' % (result.splitlines()[0])) + if result.splitlines()[0].startswith('Use: makemkvcon [switches] Command [Parameters]'): + self.log.info("MakeMkvCon found!") + return True + else: + self.log.info('MakeMkvcon seems not to be configured properly : %s' %(self.settings.mkvLocation)) + return False + \ No newline at end of file diff --git a/service.py b/service.py index 796fb61..a71a71e 100644 --- a/service.py +++ b/service.py @@ -35,6 +35,10 @@ class MyPlayer(xbmc.Player): myPlayer = MyPlayer() +xbmc.sleep(4) +if not makemkv.MakeMkvInteraction().makeMkvExists(): + imagePath = os.path.join(__addon__.getAddonInfo('path'),'resources','images', 'alerticon.png') + xbmc.executebuiltin('Notification("MakeMkv", "The MakeMKV bluray plugin cannot find MakeMkv. Please configure the plugin to point to it", "15000", "%s")' % (imagePath)) while (not xbmc.abortRequested): xbmc.sleep(4)