Ejemplo n.º 1
0
    def __init__(self, session):
        Screen.__init__(self, session)
        HelpableScreen.__init__(self)
        self["key_red"] = Button(_("Favorites"))
        self["key_yellow"] = Button("")
        self["key_blue"] = Button(_("Settings"))
        self["currentfolder"] = Label("")
        self["currentfavname"] = Label("")
        self.showiframe = Showiframe()
        self.mvion = False
        self.curfavfolder = -1
        os.system("touch /tmp/bmcmovie")
        self["actions"] = HelpableActionMap(
            self,
            "MC_VideoPlayerActions",
            {
                "ok": (self.KeyOk, "Play selected file"),
                "cancel": (self.Exit, "Exit Video Player"),
                "left": (self.leftUp, "List Top"),
                "right": (self.rightDown, "List Bottom"),
                "up": (self.up, "List up"),
                "down": (self.down, "List down"),
                "menu": (self.KeyMenu, "File / Folder Options"),
                "info": (self.showFileInfo, "Show File Info"),
                "nextBouquet": (self.NextFavFolder, "Next Favorite Folder"),
                "prevBouquet":
                (self.PrevFavFolder, "Previous Favorite Folder"),
                #				"red": (self.FavoriteFolders, "Favorite Folders"),
                "blue": (self.KeySettings, "Settings"),
            },
            -2)

        currDir = config.plugins.mc_vp.lastDir.value
        if not pathExists(currDir):
            currDir = "/"
        self["currentfolder"].setText(str(currDir))
        sort = config.plugins.mc_vp_sortmode.enabled.value
        self.filelist = []
        self["filelist"] = []
        inhibitDirs = [
            "/bin", "/boot", "/dev", "/dev.static", "/etc", "/lib", "/proc",
            "/ram", "/root", "/sbin", "/sys", "/tmp", "/usr", "/var"
        ]
        self.filelist = FileList(
            currDir,
            useServiceRef=True,
            showDirectories=True,
            showFiles=True,
            matchingPattern=
            "(?i)^.*\.(ts|vob|mpg|mpeg|avi|mkv|dat|iso|img|mp4|wmv|flv|divx|mov|ogm|m2ts)",
            additionalExtensions=None,
            sort=sort)
        self["filelist"] = self.filelist
        self["filelist"].show()
 def __init__(self, session):
     global currDir
     Screen.__init__(self, session)
     HelpableScreen.__init__(self)
     self['key_red'] = Button(_('Delete Movie'))
     self['key_yellow'] = Button('')
     self['key_blue'] = Button(_('Settings'))
     self['currentfolder'] = Label('')
     self['currentfavname'] = Label('')
     self.showiframe = Showiframe()
     self.mvion = False
     self.curfavfolder = -1
     os.system('touch /tmp/bmcmovie')
     self['actions'] = HelpableActionMap(self, 'MC_VideoPlayerActions', {'ok': (self.KeyOk, 'Play selected file'),
      'cancel': (self.Exit, 'Exit Video Player'),
      'left': (self.leftUp, 'List Top'),
      'right': (self.rightDown, 'List Bottom'),
      'up': (self.up, 'List up'),
      'down': (self.down, 'List down'),
      'menu': (self.KeyMenu, 'File / Folder Options'),
      'info': (self.showFileInfo, 'Show File Info'),
      'nextBouquet': (self.NextFavFolder, 'Next Favorite Folder'),
      'prevBouquet': (self.PrevFavFolder, 'Previous Favorite Folder'),
      'red': (self.SelDelete, 'Delete Movie'),
      'blue': (self.KeySettings, 'Settings')}, -2)
     currDir = config.plugins.mc_vp.lastDir.value
     if not pathExists(currDir):
         currDir = '/'
     self['currentfolder'].setText(str(currDir))
     sort = config.plugins.mc_vp_sortmode.enabled.value
     self.filelist = []
     self['filelist'] = []
     inhibitDirs = ['/bin',
      '/boot',
      '/dev',
      '/dev.static',
      '/etc',
      '/lib',
      '/proc',
      '/ram',
      '/root',
      '/sbin',
      '/sys',
      '/tmp',
      '/usr',
      '/var']
     self.filelist = FileList(currDir, useServiceRef=True, showDirectories=True, showFiles=True, matchingPattern='(?i)^.*\\.(ts|vob|mpg|mpeg|avi|mkv|dat|iso|img|mp4|wmv|flv|divx|mov|ogm|m2ts)', additionalExtensions=None, sort=sort)
     self['filelist'] = self.filelist
     self['filelist'].show()
     return
Ejemplo n.º 3
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self["actions"] = ActionMap(
            ["WizardActions", "DirectionActions", "ColorActions"], {
                "back": self.exit,
                "blue": self.config,
                "right": self.nextItem,
                "left": self.previousItem
            }, -1)
        self["statustext"] = StaticText()
        self["currenticon"] = WeatherIcon()
        self["CurrentCity"] = StaticText()
        self["currentTemp"] = StaticText()
        self["condition"] = StaticText()
        self["wind_condition"] = StaticText()
        self["humidity"] = StaticText()
        self["observationtime"] = StaticText()
        self["observationpoint"] = StaticText()
        self["feelsliketemp"] = StaticText()
        self.showiframe = Showiframe()
        self.mvion = False

        i = 1
        while i <= 5:
            self["weekday%s" % i] = StaticText()
            self["weekday%s_icon" % i] = WeatherIcon()
            self["weekday%s_temp" % i] = StaticText()
            self["weekday%s_tempname" % i] = StaticText()
            i += 1
        del i

        self.appdir = eEnv.resolve(
            "${libdir}/enigma2/python/Plugins/Extensions/BMediaCenter/icons/70x70/"
        )
        self.weatherPluginEntryIndex = -1
        self.weatherPluginEntryCount = config.plugins.mc_wi.entrycount.value
        if self.weatherPluginEntryCount >= 1:
            self.weatherPluginEntry = config.plugins.mc_wi.Entry[0]
            self.weatherPluginEntryIndex = 1
        else:
            self.weatherPluginEntry = None
        self.language = config.osd.language.value.replace("_", "-")
        if self.language == "en-EN":  # hack
            self.language = "en-US"
        self.webSite = ""
        self.onLayoutFinish.append(self.startRun)
Ejemplo n.º 4
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self['actions'] = ActionMap(
            ['WizardActions', 'DirectionActions', 'ColorActions'], {
                'back': self.exit,
                'blue': self.config,
                'right': self.nextItem,
                'left': self.previousItem
            }, -1)
        self['statustext'] = StaticText()
        self['currenticon'] = WeatherIcon()
        self['CurrentCity'] = StaticText()
        self['currentTemp'] = StaticText()
        self['condition'] = StaticText()
        self['wind_condition'] = StaticText()
        self['humidity'] = StaticText()
        self['observationtime'] = StaticText()
        self['observationpoint'] = StaticText()
        self['feelsliketemp'] = StaticText()
        self.showiframe = Showiframe()
        self.mvion = False
        i = 1
        while i <= 5:
            self['weekday%s' % i] = StaticText()
            self['weekday%s_icon' % i] = WeatherIcon()
            self['weekday%s_temp' % i] = StaticText()
            self['weekday%s_tempname' % i] = StaticText()
            i += 1

        del i
        self.appdir = eEnv.resolve(
            '${libdir}/enigma2/python/Plugins/Extensions/BMediaCenter/icons/70x70/'
        )
        self.weatherPluginEntryIndex = -1
        self.weatherPluginEntryCount = config.plugins.mc_wi.entrycount.value
        if self.weatherPluginEntryCount >= 1:
            self.weatherPluginEntry = config.plugins.mc_wi.Entry[0]
            self.weatherPluginEntryIndex = 1
        else:
            self.weatherPluginEntry = None
        self.language = config.osd.language.value.replace('_', '-')
        if self.language == 'en-EN':
            self.language = 'en-US'
        self.webSite = ''
        self.onLayoutFinish.append(self.startRun)
        return