예제 #1
0
    def __init__(
        self,
        session,
        config_starttime=None,
        config_endtime=None,
        config_date=None,
    ):
        Screen.__init__(self, session)

        skin = skin_path + 'settings.xml'
        try:
            from boxbranding import getImageDistro, getImageVersion, getOEVersion
        except:

            if owibranding.getMachineBrand(
            ) == "Dream Multimedia" or owibranding.getOEVersion() == "OE 2.2":
                skin = skin_path + 'DreamOS/settings.xml'

        with open(skin, 'r') as f:
            self.skin = f.read()

        self['key_red'] = StaticText(_('Close'))
        self['key_green'] = StaticText(_('Save'))

        self.createConfig(config_date, config_starttime, config_endtime)

        self['actions'] = ActionMap(['XStreamityActions'], {
            'cancel': self.keyCancel,
            'red': self.keyCancel,
            'green': self.keyGo,
        }, -2)

        self.list = []
        ConfigListScreen.__init__(self, self.list)
        self.createSetup(self["config"])
예제 #2
0
    def __init__(self, session):
        Screen.__init__(self, session)
        self.session = session

        skin = skin_path + 'jmx_settings.xml'

        self.dreamos = False

        try:
            from boxbranding import getImageDistro, getImageVersion, getOEVersion
        except:
            self.dreamos = True
            if owibranding.getMachineBrand(
            ) == "Dream Multimedia" or owibranding.getOEVersion() == "OE 2.2":
                skin = skin_path + 'DreamOS/jmx_settings.xml'

        with open(skin, 'r') as f:
            self.skin = f.read()

        self.setup_title = _('Settings')

        self.onChangedEntry = []

        self.list = []
        ConfigListScreen.__init__(self,
                                  self.list,
                                  session=self.session,
                                  on_change=self.changedEntry)

        self['information'] = Label('')
        self['key_red'] = StaticText(_('Cancel'))
        self['key_green'] = StaticText(_('Save'))

        self['VirtualKB'].setEnabled(False)
        self['HelpWindow'] = Pixmap()
        self['VKeyIcon'] = Pixmap()
        self['HelpWindow'].hide()
        self['VKeyIcon'].hide()

        self['lab1'] = Label('')

        self['actions'] = ActionMap(["SetupActions"], {
            'cancel': self.cancel,
            'save': self.save,
            'ok': self.ok,
        }, -2)

        self.initConfig()
        self.createSetup()

        self.onLayoutFinish.append(self.layoutFinished)

        if self.setInfo not in self['config'].onSelectionChanged:
            self['config'].onSelectionChanged.append(self.setInfo)
예제 #3
0
    def __init__(self, session):
        Screen.__init__(self, session)

        if cfg.parental.getValue() == True:
            ProtectedScreen.__init__(self)
        self.session = session

        skin = skin_path + 'settings.xml'

        try:
            from boxbranding import getImageDistro, getImageVersion, getOEVersion
        except:

            if owibranding.getMachineBrand(
            ) == "Dream Multimedia" or owibranding.getOEVersion() == "OE 2.2":
                skin = skin_path + 'DreamOS/settings.xml'

        with open(skin, 'r') as f:
            self.skin = f.read()

        self.setup_title = (_('Main Settings'))

        self.onChangedEntry = []

        self.list = []
        ConfigListScreen.__init__(self,
                                  self.list,
                                  session=self.session,
                                  on_change=self.changedEntry)

        self['key_red'] = StaticText(_('Close'))
        self['key_green'] = StaticText(_('Save'))

        self['VirtualKB'].setEnabled(False)
        self['HelpWindow'] = Pixmap()
        self['VKeyIcon'] = Pixmap()
        self['HelpWindow'].hide()
        self['VKeyIcon'].hide()

        self['actions'] = ActionMap(
            ['XStreamityActions'], {
                'cancel': self.cancel,
                'red': self.cancel,
                'green': self.save,
                'ok': self.ok,
            }, -2)

        self.initConfig()

        self.onLayoutFinish.append(self.__layoutFinished)
예제 #4
0
	def __init__(self, session):
		Screen.__init__(self, session)
		self.session = session
		
		skin = skin_path + 'jmx_settings.xml'
		
		self.dreamos = False
		
		try:
			from boxbranding import getImageDistro, getImageVersion, getOEVersion
		except:
			self.dreamos = True
			if owibranding.getMachineBrand() == "Dream Multimedia" or owibranding.getOEVersion() == "OE 2.2":
				skin = skin_path + 'DreamOS/jmx_settings.xml'

		with open(skin, 'r') as f:
			self.skin = f.read()
						
		self.setup_title = _('Bouquets Settings')
		
		self.onChangedEntry = []
		
		self.list = []
		ConfigListScreen.__init__(self, self.list, session=self.session, on_change=self.changedEntry)
		
		self.loaded = False
		
				
		self['information'] = Label('')
		
		self['key_red'] = StaticText(_('Cancel'))
		self['key_green'] = StaticText(_('Continue'))
		
		self['VirtualKB'].setEnabled(False)
		self['HelpWindow'] = Pixmap()
		self['VKeyIcon'] = Pixmap()
		self['HelpWindow'].hide()
		self['VKeyIcon'].hide()
		self['lab1'] = Label(_('Loading data... Please wait...'))

		self['actions'] = ActionMap(['SetupActions'], {
		 'save': self.save,
		 'cancel': self.cancel
		 }, -2)
		 
		self.pause = 100 
		
		address = jglob.current_playlist['playlist_info']['address']
		self.playlisttype = jglob.current_playlist['playlist_info']['playlisttype']
		
		#defaults
		if cfg.bouquet_id.value:
			jglob.bouquet_id = cfg.bouquet_id.value
		else: 
			jglob.bouquet_id = 666

		# if xtream or external
		if self.playlisttype != 'local':
			protocol = jglob.current_playlist['playlist_info']['protocol']
			domain = jglob.current_playlist['playlist_info']['domain']
			port = str(jglob.current_playlist['playlist_info']['port'])   
			host = str(protocol) + str(domain) + ':' + str(port) + '/' 
			jglob.name = domain
		else:
			jglob.name = address
			
		if self.playlisttype == 'xtream':
			username = jglob.current_playlist['playlist_info']['username']
			password = jglob.current_playlist['playlist_info']['password']
			player_api = str(host) + 'player_api.php?username='******'&password='******'enigma2.php?username='******'&password='******'xmltv.php?username='******'&password='******'&action=get_live_categories'
			self.VodCategoriesUrl = player_api + '&action=get_vod_categories'
			self.SeriesCategoriesUrl = player_api + '&action=get_series_categories'
		
			self.LiveStreamsUrl = player_api + '&action=get_live_streams'
			self.VodStreamsUrl = player_api + '&action=get_vod_streams'
			self.SeriesUrl = player_api + '&action=get_series'
			
			jglob.epg_provider = True
		else:
			jglob.epg_provider = False
			

		jglob.old_name = jglob.name
		jglob.categories = []
		

		if 'bouquet_info' in jglob.current_playlist and jglob.current_playlist['bouquet_info'] != {}:
			jfunc.readbouquetdata()
		else:
			jglob.live_type = '4097'
			jglob.vod_type = '4097'
			jglob.vod_order = 'original'

			jglob.epg_rytec_uk = False
			jglob.epg_swap_names = False
			jglob.epg_force_rytec_uk = False

			jglob.live = True
			jglob.vod = False
			jglob.series = False
			jglob.prefix_name = True
			
		if self.playlisttype == 'xtream':
			
			# download enigma2.php to get categories    
			self.timer = eTimer()
			self.timer.start(self.pause, 1)
			try:
				self.timer_conn = self.timer.timeout.connect(self.downloadEnigma2Data)
			except:
				self.timer.callback.append(self.downloadEnigma2Data)
				
		else:
			self.createConfig()
			self.createSetup()
		
		self.onLayoutFinish.append(self.__layoutFinished)
		
		if self.setInfo not in self['config'].onSelectionChanged:
			self['config'].onSelectionChanged.append(self.setInfo)
예제 #5
0
	def __init__(self, session, editmode):
		Screen.__init__(self, session)
		self.session = session
		
		skin = skin_path + 'jmx_settings.xml'
		
		self.dreamos = False
		
		try:
			from boxbranding import getImageDistro, getImageVersion, getOEVersion
		except:
			self.dreamos = True
			if owibranding.getMachineBrand() == "Dream Multimedia" or owibranding.getOEVersion() == "OE 2.2":
				skin = skin_path + 'DreamOS/jmx_settings.xml'
			
		with open(skin, 'r') as f:
			self.skin = f.read()
			
		self.setup_title = _('Add Playlist') 
		
		self.editmode = editmode
		if self.editmode:
			self.setup_title = _('Edit Playlist')
			
		self.onChangedEntry = []
		
		self.list = []
		ConfigListScreen.__init__(self, self.list, session = self.session, on_change = self.changedEntry)
	
		
		self['key_red'] = StaticText(_('Cancel'))
		self['key_green'] = StaticText(_('Save'))
		self['information'] = Label('')
		
		self['VirtualKB'].setEnabled(False)
		self['HelpWindow'] = Pixmap()
		self['VKeyIcon'] = Pixmap()
		self['HelpWindow'].hide()
		self['VKeyIcon'].hide()
		
		self['lab1'] = Label('')
		
		self.xmltv = ''
		self.alias = ''
		self.paylisttype = ''
		self.address = 'http://'
		self.type = 'm3u'
		self.output = 'ts'
	 
		if self.editmode:
			
			if 'bouquet_info' in jglob.current_playlist:
				self.alias = jglob.current_playlist['bouquet_info']['name']
				self.xmltv = jglob.current_playlist['bouquet_info']['xmltv_address']
						
			if jglob.current_playlist['playlist_info']['playlisttype'] == 'xtream':
				self.protocol = jglob.current_playlist['playlist_info']['protocol']
				self.domain = jglob.current_playlist['playlist_info']['domain']
				self.port = str(jglob.current_playlist['playlist_info']['port'])
				self.username = jglob.current_playlist['playlist_info']['username']
				self.password = jglob.current_playlist['playlist_info']['password']
				self.type = jglob.current_playlist['playlist_info']['type']
				self.output = jglob.current_playlist['playlist_info']['output']
				self.index = jglob.current_playlist['playlist_info']['index']
			else:
				self.address = jglob.current_playlist['playlist_info']['address']
				
		self['actions'] = ActionMap(['SetupActions'],
		 {
		 'cancel': self.cancel,
		 'save': self.save,

		 }, -2)

		self.initConfig()
		self.createSetup()
		
		self.onLayoutFinish.append(self.layoutFinished)
		
		if self.setInfo not in self['config'].onSelectionChanged:
			self['config'].onSelectionChanged.append(self.setInfo)
예제 #6
0
    def __init__(self, session, editmode):
        Screen.__init__(self, session)
        self.session = session

        skin = skin_path + 'settings.xml'

        try:
            from boxbranding import getImageDistro, getImageVersion, getOEVersion
        except:

            if owibranding.getMachineBrand(
            ) == "Dream Multimedia" or owibranding.getOEVersion() == "OE 2.2":
                skin = skin_path + 'DreamOS/settings.xml'

        with open(skin, 'r') as f:
            self.skin = f.read()

        self.setup_title = (_('Add Server'))

        self.editmode = editmode
        if self.editmode:
            self.setup_title = (_('Edit Server'))

        self.onChangedEntry = []

        self.list = []
        ConfigListScreen.__init__(self,
                                  self.list,
                                  session=self.session,
                                  on_change=self.changedEntry)

        self['key_red'] = StaticText(_('Close'))
        self['key_green'] = StaticText(_('Save'))

        self['VirtualKB'].setEnabled(False)
        self['HelpWindow'] = Pixmap()
        self['VKeyIcon'] = Pixmap()
        self['HelpWindow'].hide()
        self['VKeyIcon'].hide()

        self.name = ''
        self.protocol = 'http://'
        self.server = 'domain.xyz'
        self.port = 80
        self.username = '******'
        self.password = '******'
        self.listType = 'm3u'
        self.output = 'ts'
        self.livetype = cfg.livetype.getValue()
        self.vodtype = cfg.vodtype.getValue()
        self.epgShift = 0

        self['actions'] = ActionMap(['XStreamityActions'], {
            'cancel': self.cancel,
            'red': self.cancel,
            'green': self.save,
        }, -2)

        self.onFirstExecBegin.append(self.initConfig)

        self.onLayoutFinish.append(self.__layoutFinished)