Update service to show an alert if MakeMkvCon is not found
This commit is contained in:
parent
45cf03cb16
commit
dab2624c88
3 changed files with 16 additions and 0 deletions
BIN
resources/images/alerticon.png
Normal file
BIN
resources/images/alerticon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
|
@ -99,3 +99,15 @@ class MakeMkvInteraction:
|
|||
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
|
||||
|
||||
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue