-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathplugin.py
More file actions
52 lines (43 loc) · 1.9 KB
/
plugin.py
File metadata and controls
52 lines (43 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# for localized messages
from . import _
#################################################################################
#
# Plugin for Enigma2
# version:
#
# Coded by ims (c)2015-2021
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#################################################################################
from Plugins.Plugin import PluginDescriptor
from Components.config import config, ConfigSubsection, ConfigYesNo
config.plugins.ModifyPLiFullHD = ConfigSubsection()
config.plugins.ModifyPLiFullHD.enabled = ConfigYesNo(default=False)
def autostart(reason, **kwargs):
import ui
if reason == 0 and config.plugins.ModifyPLiFullHD.enabled.value and config.skin.primary_skin.value.split('/')[0] in ("PLi-FullHD", "PLi-FullNightHD", "PLi-HD1") and ui.reload_skin_on_start:
ui.modifyskin.applyAutorun()
def main(session, **kwargs):
import ui
def recursive(answer=False):
if answer:
session.openWithCallback(recursive, ui.ModifyPLiFullHD, answer[0], answer[1])
session.openWithCallback(recursive, ui.ModifyPLiFullHD)
def Plugins(path, **kwargs):
global plugin_path
plugin_path = path
name = _("Modify PLi-FullHD")
descr = _("Change regular font and colors in PLi FullHD/FullNightHD/HD1 skins")
return [
PluginDescriptor(name=name, description=descr, where=PluginDescriptor.WHERE_PLUGINMENU, icon='plugin.png', fnc=main),
PluginDescriptor(name=name, description=descr, where=[PluginDescriptor.WHERE_SESSIONSTART], fnc=autostart),
]