1 from Components.config import config, ConfigSubsection, ConfigInteger, ConfigSubList
2 from Plugins.Plugin import PluginDescriptor
3 from Screens.MessageBox import MessageBox
7 config.plugins.AC3LipSync = ConfigSubsection()
8 config.plugins.AC3LipSync.lowerBound = ConfigInteger(default = 0, limits = (0,10000))
9 config.plugins.AC3LipSync.upperBound = ConfigInteger(default = 405, limits = (0,10000))
10 config.plugins.AC3LipSync.arrowStepSize = ConfigInteger(default = 5, limits = (0,10000))
11 config.plugins.AC3LipSync.stepSize = ConfigInteger(default = 45, limits = (0,10000))
12 config.plugins.AC3LipSync.keySteps = ConfigSubList()
13 for i in range(0, 10):
14 s = ConfigSubsection()
15 s.stepSize = ConfigInteger(default = i*45, limits = (0,10000))
16 config.plugins.AC3LipSync.keySteps.append(s)
19 def main(session, **kwargs):
21 session.open(AC3main.AC3LipSync)
23 def setup(session, **kwargs):
25 session.open(AC3setup.AC3LipSyncSetup)
27 def mainSetup(menuid, **kwargs):
29 return [(_("AC3 Lip Sync"), main, "ac3_lipsync", 99)]
32 def Plugins(**kwargs):
33 return [ PluginDescriptor(name=_("AC3 Lip Sync"), description=_("sets the AC3 audio Delay (LipSync)"), where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc=main),
34 PluginDescriptor(name=_("AC3 Lip Sync Setup"), description=_("Setup for the AC3 Lip Sync Plugin"), icon = "AC3LipSync.png", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=setup),
35 PluginDescriptor(name=_("AC3 Lip Sync"), description=_("sets the AC3 audio Delay (LipSync)"), where = PluginDescriptor.WHERE_MENU, fnc=mainSetup)]