From 49426a3ddc6a1a1750f9f9e7dd11d20a5130cfcb Mon Sep 17 00:00:00 2001 From: gutosie Date: Sat, 11 Apr 2020 12:34:15 +0200 Subject: [PATCH] 8.21 fix.cam_restart --- NeoBoot/plugin.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/NeoBoot/plugin.py b/NeoBoot/plugin.py index 1efd79e..437bf5e 100644 --- a/NeoBoot/plugin.py +++ b/NeoBoot/plugin.py @@ -31,7 +31,7 @@ from Components.Pixmap import Pixmap, MultiPixmap from Components.config import * from Components.ConfigList import ConfigListScreen from Tools.LoadPixmap import LoadPixmap -from Tools.Directories import fileExists, pathExists, createDir, resolveFilename, SCOPE_PLUGINS +from Tools.Directories import fileExists, fileCheck, pathExists, createDir, resolveFilename, SCOPE_PLUGINS from os import system, listdir, mkdir, chdir, getcwd, rename as os_rename, remove as os_remove, popen from os.path import dirname, isdir, isdir as os_isdir import os @@ -879,12 +879,19 @@ class NeoBootImageChoose(Screen): '3': self.ReinstallKernel, '4': self.ReinstallKernel, '5': self.boot, - '0': self.boot, + '9': self.boot, + '0': self.Cam_Restart, 'back': self.close_exit}) if not fileExists('/etc/name'): os.system('touch /etc/name') self.onShow.append(self.updateList) + def Cam_Restart(self): + if fileCheck('/etc/init.d/softcam'): + os.system('/etc/init.d/softcam stop; sleep 2; /etc/init.d/softcam start||restart') + self.session.open(MessageBox, _('SoftCam zosta\xc5\x82a zrestartowany.'), MessageBox.TYPE_INFO, 5) + self.close() + def DownloadImageOnline(self): if not os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/ImageDownloader/download.py'): message = _('[NeoBoot] Image Downloader - download plugin not installed!\nZainstalowac wtyczke do pobierania nowych image ? \n---Continue ?--- ' )