Enigma2 plugin to to play various online streams (mostly Latvian).

plugin.py 865B

1234567891011121314151617181920212223
  1. from Plugins.Plugin import PluginDescriptor
  2. import PlayStream
  3. from . import _
  4. import traceback
  5. def main(session, **kwargs):
  6. try:
  7. reload(PlayStream)
  8. session.open(PlayStream.MainScreen)
  9. except Exception as e:
  10. print "Error loading PlayStream - "+ e.message
  11. traceback.print_exc()
  12. def menu(menuid, **kwargs):
  13. if menuid == "mainmenu":
  14. return [("Play Stream", main, "playstream", 57)]
  15. return []
  16. def Plugins(**kwargs):
  17. return [
  18. PluginDescriptor(name = "Play Stream",description = _("Play online streams from various sources"),where = [PluginDescriptor.WHERE_PLUGINMENU,PluginDescriptor.WHERE_EXTENSIONSMENU], icon = "plugin.png", fnc = main),
  19. PluginDescriptor(name="Play Stream", description=_("Play online streams from various sources"), where = [PluginDescriptor.WHERE_MENU], fnc=menu)
  20. ]