def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) if type == 'Auto': self.type = self.Auto elif type.startswith('Format:'): self.type = self.Format self.paramert_str = type elif type == 'Crypt': self.type = self.Crypt else: self.type = self.PreDefine self.poll_interval = 1000 self.poll_enabled = True self.TxtCaids = { "26" : "(BiSS)", "01" : "(SECA)", "06" : "(Irdeto)", "17" : "(BetaCrypt)", "05" : "(Viaccess)", "18" : "(Nagravision)", "09" : "(NDS)", "0B" : "(Conax)", "0D" : "(Cryptoworks)", "4A" : "(DRE-Crypt)", "27" : "(ExSet)", "0E" : "(PowerVu)", "22" : "(Codicrypt)", "07" : "(DigiCipher)", "56" : "(Verimatrix)", "7B" : "(DRE-Crypt)", "A1" : "(Rosscrypt)"}
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) self.poll_interval = 2*1000 self.poll_enabled = True if type == "System": self.type = self.SYSTEM elif type == "CaID": self.type = self.CAID elif type == "Pid": self.type = self.PID elif type == "Protocol": self.type = self.PROTOCOL elif type == "Address" or type == "ServerInfo": self.type = self.ADDRESS elif type == "ProvID": self.type = self.PROVID elif type == "Time" or type == "ECMTime": self.type = self.TIME elif type == "Hops": self.type = self.HOPS elif type == "CW0": self.type = self.CW0 elif type == "CW1": self.type = self.CW1 elif type == "Name": self.type = self.NAME elif type == "EMU": self.type = self.NAME_SLIM elif type == "BasicInfo" or type == "IDInfo": self.type = self.BASIC_INFO elif type == "CryptInfo": self.type = self.CRYPT_INFO
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) if type == "NameSlot1": self.type = self.SLOT1 elif type == "NameSlot2": self.type = self.SLOT2 elif type == "NameSlot3": self.type = self.SLOT3 elif type == "NameSlot4": self.type = self.SLOT4 elif type == "ModuleSlot1": self.type = self.NAME1 elif type == "ModuleSlot2": self.type = self.NAME2 elif type == "ModuleSlot3": self.type = self.NAME3 elif type == "ModuleSlot4": self.type = self.NAME4 elif type == "PiconSlot1": self.type = self.PICON1 elif type == "PiconSlot2": self.type = self.PICON2 elif type == "PiconSlot3": self.type = self.PICON3 elif type == "PiconSlot4": self.type = self.PICON4 self.poll_interval = 1000 self.poll_enabled = True
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) self.type = { "ShowMe": self.SMART_LABEL, "ExpertInfo": self.SMART_INFO_H, "ExpertInfoVertical": self.SMART_INFO_V, "ServiceInfo": self.SERVICE_INFO, "CryptoInfo": self.CRYPTO_INFO }[type] try: self.poll_interval = config.plugins.ValiKSSetup.pollTime.value*1000 except: self.poll_interval = 1000 self.poll_enabled = True self.idnames = ( ( "0x100", "0x1FF","Seca" ,"Seca", " "), ( "0x500", "0x5FF","Via" ,"Viaccess", " "), ( "0x600", "0x6FF","Irdeto" ,"Irdeto", " "), ( "0x900", "0x9FF","NDS" ,"Videoguard", " "), ( "0xB00", "0xBFF","Conax" ,"Conax", " "), ( "0xD00", "0xDFF","CryptoW","Cryptoworks", " "), ("0x1700","0x17FF","Beta" ,"Betacrypt", " "), ("0x1800","0x18FF","Nagra" ,"Nagravision", " ")) self.ecmdata = GetEcmInfo()
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) type = type.split(',') self.shortFormat = "Short" in type self.fullFormat = "Full" in type if "HddTemp" in type: self.type = self.HDDTEMP elif "MemFree" in type: self.type = self.MEMFREE elif "UsbInfo" in type: self.type = self.USBINFO elif "HddInfo" in type: self.type = self.HDDINFO elif "FlashInfo2" in type: self.type = self.FLASHINFO2 elif "MovieDir" in type: self.type = self.MOVIEDIR else: self.type = self.FLASHINFO if self.type in (self.FLASHINFO,self.FLASHINFO2,self.HDDINFO,self.USBINFO): self.poll_interval = 5000 else: self.poll_interval = 1000 self.poll_enabled = True
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) self.type = {'ExpertInfo': self.SMART_INFO_H}[type] self.poll_interval = 30000 self.poll_enabled = True self.ar_fec = ['Auto', '1/2', '2/3', '3/4', '5/6', '7/8', '3/5', '4/5', '8/9', '9/10', 'None', 'None', 'None', 'None', 'None'] self.ar_pol = ['H', 'V', 'CL', 'CR', 'na', 'na', 'na', 'na', 'na', 'na', 'na', 'na']
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) self.paramert_str = "" if type.startswith("capacity"): self.type = self.capacity self.device = type.split()[-1].strip() elif type.startswith("free"): self.type = self.free self.device = type.split()[-1].strip() elif type.startswith("model"): self.type = self.model self.device = type.split()[-1].strip() elif type.startswith("fsystem"): self.type = self.fsystem self.device = type.split()[-1].strip() elif type.startswith("dpoint"): self.type = self.dpoint self.device = type.split()[-1].strip() elif type.startswith("Format:"): self.type = self.format self.paramert_str = type self.poll_interval = 2000 self.poll_enabled = True
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) self.poll_interval = 30000 self.poll_enabled = True if type == "REF": self.type = self.REF elif type == "IP": self.type = self.IP elif type == "NAME": self.type = self.NAME elif type == "ENCODER": self.type = self.ENCODER elif type == "NUMBER": self.type = self.NUMBER elif type == "SHORT_ALL": self.type = self.SHORT_ALL elif type == "ALL": self.type = self.ALL elif type == "INFO": self.type = self.INFO elif type == "INFO_RESOLVE": self.type = self.INFO_RESOLVE elif type == "INFO_RESOLVE_SHORT": self.type = self.INFO_RESOLVE_SHORT else: self.type = self.UNKNOWN self.streamServer = eStreamServer.getInstance()
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) if type == "Background": self.type = self.PROGRESSBACKROUND self.poll_interval = 30*1000 self.poll_enabled = True
def __init__(self, type): Poll.__init__(self) Converter.__init__(self, type) self.type = type self.systemCaids = {"26":"biss","4A":"dre","05":"via","01":"sec","06":"ird","17":"bet","18":"nag","09":"nds","0B":"con","0D":"crw"} self.poll_interval = 1000 self.poll_enabled = True
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) if type == 'Auto': self.type = self.Auto elif type.startswith('Format:'): self.type = self.Format self.paramert_str = type elif type == 'Crypt': self.type = self.Crypt else: self.type = self.PreDefine self.poll_interval = 1000 self.poll_enabled = True self.TxtCaids = { "26" : "BiSS", "01" : "Seca-Mediaguard", "06" : "Irdeto", "17" : "BetaCrypt", "05" : "Viacces", "18" : "Nagravision", "09" : "NDS-Videoguard", "0B" : "Conax", "0D" : "Cryptoworks", "4A" : "DRE-Crypt", "27" : "ExSet", "0E" : "PowerVu", "22" : "Codicrypt", "07" : "DigiCipher", "56" : "Verimatrix", "7B" : "DRE-Crypt", "A1" : "Rosscrypt"}
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) if type == "link": self.type = self.link elif type == "level": self.type = self.level elif type == "noise": self.type = self.noise elif type == "linkqua": self.type = self.linkqua elif type == "bitrate": self.type = self.bitrate elif type == "ssid": self.type = self.ssid elif type == "encryption": self.type = self.encryption elif type == "wifilabel": self.type = self.wifilabel elif type == "wifionoff": self.type = self.wifionoff elif type == "linklabel": self.type = self.linklabel elif type == "levellabel": self.type = self.levellabel elif type == "noiselabel": self.type = self.noiselabel elif type == "bitratelabel": self.type = self.bitratelabel elif type == "ssidlabel": self.type = self.ssidlabel elif type == "encryptlabel": self.type = self.encryptlabel self.poll_interval = 3000 self.poll_enabled = True
def __init__(self, type): Poll.__init__(self) Converter.__init__(self, type) self.type = type self.systemCaids = {'06': 'I', '01': 'S', '18': 'N', '05': 'V', '0B': 'CO', '17': 'BC', '0D': 'CW', '4A': 'DC', '55': 'BG', '09': 'NDS'} self.poll_interval = 2000 self.poll_enabled = True if type == 'EcmInfo': self.type = self.ECMINFO elif type == 'OnlineTest': self.type = self.ONLINETEST elif type == 'TempInfo': self.type = self.TEMPINFO elif type == 'FanInfo': self.type = self.FANINFO else: self.type = self.ALL
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) self.poll_enabled = True if type == 'Name' or not len(str(type)): self.type = self.NAME elif type == 'Number': self.type = self.NUMBER elif type == 'Bouquet': self.type = self.BOUQUET elif type == 'Provider': self.type = self.PROVIDER elif type == 'Reference': self.type = self.REFERENCE elif type == 'OrbitalPos': self.type = self.ORBPOS elif type == 'TpansponderInfo': self.type = self.TPRDATA elif type == 'Satellite': self.type = self.SATELLITE else: self.type = self.FORMAT self.sfmt = type[:] self.what = self.tpdata = None self.Timer = eTimer() self.Timer.callback.append(self.neededChange)
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) if type == 'volume': self.type = self.VOLUMEN self.poll_interval = 100 self.poll_enabled = True
def __init__(self, type): Poll.__init__(self) Converter.__init__(self, type) args = type.split(',') if len(args) != 2: raise ElementError("type must contain exactly 2 arguments") type = args.pop(0) invisible = args.pop(0) if type == 'SatInfo': self.type = self.SATINFO elif type == 'VeryShortCaid': self.type = self.VERYSHORTCAID elif type == 'VeryShortReader': self.type = self.VERYSHORTREADER elif type == 'ShortReader': self.type = self.SHORTREADER elif type == 'Normal': self.type = self.NORMAL elif type == 'Long': self.type = self.LONG else: self.type = self.VERYLONG if invisible == "FTAInvisible": self.invisible = self.FTAINVISIBLE else: self.invisible = self.FTAVISIBLE self.poll_interval = 1000 self.poll_enabled = True
def __init__(self, type): Poll.__init__(self) Converter.__init__(self, type) args = type.split(',') type = args.pop(0) self.negate = 'Negate' in args self.detailed = 'Detailed' in args self.showHours = 'ShowHours' in args self.showNoSeconds = 'ShowNoSeconds' in args if type == 'Length': self.type = self.TYPE_LENGTH elif type == 'Position': self.type = self.TYPE_POSITION elif type == 'Remaining': self.type = self.TYPE_REMAINING elif type == 'Gauge': self.type = self.TYPE_GAUGE elif type == 'EndTime': self.type = self.TYPE_ENDTIME else: raise ElementError('type must be {Length|Position|Remaining|Gauge|EndTime} with optional arguments {Negate|Detailed|ShowHours|ShowNoSeconds} for SCServicePosition converter') if self.detailed: self.poll_interval = 100 elif self.TYPE_ENDTIME: self.poll_interval = 1000 elif self.type == self.TYPE_LENGTH: self.poll_interval = 2000 else: self.poll_interval = 500 self.poll_enabled = True
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) self.type = type self.poll_interval = 1000 self.poll_enabled = True self.codecs = { "01_dolbydigitalplus": ("digital+", "digitalplus", "ac3+", "e-ac-3"), "02_dolbydigital": ("ac3", "ac-3", "dolbydigital"), "03_mp3": ("mp3", ), "04_wma": ("wma", ), "05_flac": ("flac", ), "06_mpeg": ("mpeg", ), "07_lpcm": ("lpcm", ), "08_dts-hd": ("dts-hd", ), "09_dts": ("dts", ), "10_pcm": ("pcm", ), "11_aac": ("aac", ), "12_mp1": ("mp1", ), "13_mp2": ("mp2", ), "13_mp4": ("mp4", ), } self.codec_info = { "dolbydigitalplus": ("51", "20", "71"), "dolbydigital": ("51", "20", "71"), "wma": ("8", "9"), } self.type, self.interesting_events = { "AudioIcon": (self.GET_AUDIO_ICON, (iPlayableService.evUpdatedInfo,)), "AudioCodec": (self.GET_AUDIO_CODEC, (iPlayableService.evUpdatedInfo,)), }[type]
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) self.num = None self.showclock = 0 self.delay = 5000 self.loop = -1 self.type = type.lower().split(';') if 'number' in self.type and 'clock' not in self.type: # Only channel number self.delay = 0 self.poll_enabled = False else: self.poll_enabled = True if 'clock' in self.type and 'number' not in self.type: # Only clock self.showclock = 1 self.delay = -1 else: for x in self.type: if x.isdigit(): self.delay = int(x) * 1000 break if 'loop' in self.type and self.delay: self.loop = self.delay if 'nozero' in self.type: self.hour = '%' else: self.hour = '%02' if '12h' in self.type: self.hour = self.hour + 'I' else: self.hour = self.hour + 'H'
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) if type == "city": self.type = self.city elif type == "temp": self.type = self.temp elif type == "condition": self.type = self.condition elif type == "windtxt": self.type = self.windtxt elif type == "windspeed": self.type = self.windspeed elif type == "humiditytxt": self.type = self.humiditytxt elif type == "humiditydata": self.type = self.humiditydata elif type == "picon": self.type = self.picon elif type.startswith('Format:'): self.type = self.format self.paramert_str = type else: self.type = self.allinfo self.iConsole = iConsole() self.poll_interval = time_update_ms self.poll_enabled = True
def __init__(self, type): Poll.__init__(self) Converter.__init__(self, type) if type == "WithSeconds": self.type = self.WITH_SECONDS self.poll_interval = 1000 self.poll_enabled = True elif type == "NoSeconds": self.type = self.NO_SECONDS self.poll_interval = 60 * 1000 self.poll_enabled = True elif type == "InSeconds": self.type = self.IN_SECONDS self.poll_interval = 1000 self.poll_enabled = True elif type == "Percentage": self.type = self.PERCENTAGE self.poll_interval = 60 * 1000 self.poll_enabled = True elif type == "VFD": self.type = self.VFD elif type == "VFDWithSeconds": self.type = self.VFD_WITH_SECONDS self.poll_interval = 1000 self.poll_enabled = True elif type == "VFDNoSeconds": self.type = self.VFD_NO_SECONDS self.poll_interval = 60 * 1000 self.poll_enabled = True elif type == "VFDInSeconds": self.type = self.VFD_IN_SECONDS self.poll_interval = 1000 self.poll_enabled = True elif type == "VFDPercentage": self.type = self.VFD_PERCENTAGE self.poll_interval = 60 * 1000 self.poll_enabled = True elif type == "OnlyMinute": self.type = self.ONLY_MINUTE else: self.type = self.DEFAULT if ( config.usage.swap_time_display_on_osd.value == "1" or config.usage.swap_time_display_on_osd.value == "3" or config.usage.swap_time_display_on_osd.value == "5" or config.usage.swap_time_display_on_vfd.value == "1" or config.usage.swap_time_display_on_vfd.value == "3" or config.usage.swap_time_display_on_vfd.value == "5" ): self.poll_interval = 60 * 1000 self.poll_enabled = True if ( config.usage.swap_time_display_on_osd.value == "2" or config.usage.swap_time_display_on_osd.value == "4" or config.usage.swap_time_display_on_vfd.value == "2" or config.usage.swap_time_display_on_vfd.value == "4" ): self.poll_interval = 1000 self.poll_enabled = True
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) type = type.split(',') self.shortFormat = "Short" in type self.fullFormat = "Full" in type if "HddTemp" in type: self.type = self.HDDTEMP elif "LoadAvg" in type: self.type = self.LOADAVG elif "MemTotal" in type: self.type = self.MEMTOTAL elif "MemFree" in type: self.type = self.MEMFREE elif "SwapTotal" in type: self.type = self.SWAPTOTAL elif "SwapFree" in type: self.type = self.SWAPFREE elif "UsbInfo" in type: self.type = self.USBINFO elif "HddInfo" in type: self.type = self.HDDINFO else: self.type = self.FLASHINFO if self.type in (self.FLASHINFO,self.HDDINFO,self.USBINFO): self.poll_interval = 5000 else: self.poll_interval = 1000 self.poll_enabled = True
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) type = type.split(',') self.shortFormat = 'Short' in type self.fullFormat = 'Full' in type if 'HddTemp' in type: self.type = self.HDDTEMP elif 'LoadAvg' in type: self.type = self.LOADAVG elif 'MemTotal' in type: self.type = self.MEMTOTAL elif 'MemFree' in type: self.type = self.MEMFREE elif 'SwapTotal' in type: self.type = self.SWAPTOTAL elif 'SwapFree' in type: self.type = self.SWAPFREE elif 'UsbInfo' in type: self.type = self.USBINFO elif 'HddInfo' in type: self.type = self.HDDINFO elif 'DriverInfo' in type: self.type = self.DRIVERINFO elif 'SystemTemp' in type: self.type = self.SYSTEMTEMP else: self.type = self.FLASHINFO if self.type in (self.FLASHINFO, self.HDDINFO, self.USBINFO): self.poll_interval = 5000 else: self.poll_interval = 1000 self.poll_enabled = True
def __init__(self, type): Converter.__init__(self, type) self.short_list = True self.cpu_count = 0 self.prev_info = self.getCpuInfo(self.CPU_CALC) if type == "Total": self.type = self.CPU_TOTAL self.sfmt = "CPU: $0" elif not type: self.type = self.CPU_TOTAL self.sfmt = "$0" else: self.type = self.CPU_ALL self.sfmt = txt = str(type) pos = 0 while True: pos = self.sfmt.find("$", pos) if pos == -1: break if pos < len(self.sfmt)-1 and self.sfmt[pos+1].isdigit(): x = int(self.sfmt[pos+1]) if x > self.cpu_count: self.sfmt = self.sfmt.replace("$" + self.sfmt[pos+1], "n/a") pos += 1 self.curr_info = self.getCpuInfo(self.type) Poll.__init__(self) self.poll_interval = 500 self.poll_enabled = True
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) self.type = type self.poll_interval = 1000 self.poll_enabled = True self.feraw = self.fedata = self.updateFEdata = None
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) if type == "city": self.type = self.city elif type == "country": self.type = self.country elif type == "direction": self.type = self.direction elif type == "speed": self.type = self.speed elif type == "humidity": self.type = self.humidity elif type == "visibility": self.type = self.visibility elif type == "pressure": self.type = self.pressure elif type == "pressurenm": self.type = self.pressurenm elif type == "text": self.type = self.wtext elif type == "temp": self.type = self.temp elif type == "picon": self.type = self.picon self.poll_interval = time_update_ms self.poll_enabled = True
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) self.type = self.EXPERTINFO self.poll_interval = 30000 self.poll_enabled = True self.ar_fec = ['Auto', '1/2', '2/3', '3/4', '5/6', '7/8', '3/5', '4/5', '8/9', '9/10', 'None', 'None', 'None', 'None', 'None'] self.ar_pol = ['H', 'V', 'CL', 'CR', 'na', 'na', 'na', 'na', 'na', 'na', 'na', 'na'] self.satNames = {} self.readSatXml()
def __init__(self, type): Poll.__init__(self) Converter.__init__(self, type) args = type.split(',') type = args.pop(0) self.negate = 'Negate' in args self.plus = 'Plus' in args self.detailed = 'Detailed' in args self.showHours = 'ShowHours' in args self.showNoSeconds = 'ShowNoSeconds' in args if type == "Length": self.type = self.TYPE_LENGTH elif type == "Position": self.type = self.TYPE_POSITION elif type == "Remaining": self.type = self.TYPE_REMAINING elif type == "Gauge": self.type = self.TYPE_GAUGE elif type == "Summary": self.type = self.TYPE_SUMMARY else: raise ElementError("type must be {Length|Position|Remaining|Gauge} with optional arguments {Negate|Detailed|ShowHours|ShowNoSeconds} for ServicePosition converter") if self.detailed: self.poll_interval = 100 elif self.type == self.TYPE_LENGTH: self.poll_interval = 2000 else: self.poll_interval = 500 self.poll_enabled = True
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) self.paramert_str = '' if type.startswith('capacity'): self.type = self.capacity self.device = type.split()[-1].strip() elif type.startswith('free'): self.type = self.free self.device = type.split()[-1].strip() elif type.startswith('model'): self.type = self.model self.device = type.split()[-1].strip() elif type.startswith('fsystem'): self.type = self.fsystem self.device = type.split()[-1].strip() elif type.startswith('dpoint'): self.type = self.dpoint self.device = type.split()[-1].strip() elif type.startswith('Format:'): self.type = self.format self.paramert_str = type self.poll_interval = 2000 self.poll_enabled = True
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) self.type = type and str(type) self.index = False self.num = None self.poll_interval = 10000 self.poll_enabled = True
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) if type == "Vfd": self.type = self.VFD elif type == "Date": self.type = self.DATE elif type == "Shortdate": self.type = self.SHORTDATE elif type == "Day": self.type = self.DAY elif type == "Shortday": self.type = self.SHORTDAY elif type == "Location": self.type = self.LOCATION elif type == "Timezone": self.type = self.TIMEZONE elif type == "Latitude": self.type = self.LATITUDE elif type == "Longitude": self.type = self.LONGITUDE elif type == "Temp": self.type = self.TEMP elif type == "Picon": self.type = self.PICON elif type == "Skytext": self.type = self.SKYTEXT elif type == "Feelslike": self.type = self.FEELSLIKE elif type == "Humidity": self.type = self.HUMIDITY elif type == "Wind": self.type = self.WIND elif type == "Windspeed": self.type = self.WINDSPEED # today # elif type == "Date0": self.type = self.DATE0 elif type == "Shortdate0": self.type = self.SHORTDATE0 elif type == "Day0": self.type = self.DAY0 elif type == "Shortday0": self.type = self.SHORTDAY0 elif type == "Temp0": self.type = self.TEMP0 elif type == "Lowtemp0": self.type = self.LOWTEMP0 elif type == "Hightemp0": self.type = self.HIGHTEMP0 elif type == "Picon0": self.type = self.PICON0 elif type == "Skytext0": self.type = self.SKYTEXT0 elif type == "Precip0": self.type = self.PRECIP0 # day 1 # elif type == "Date1": self.type = self.DATE1 elif type == "Shortdate1": self.type = self.SHORTDATE1 elif type == "Day1": self.type = self.DAY1 elif type == "Shortday1": self.type = self.SHORTDAY1 elif type == "Temp1": self.type = self.TEMP1 elif type == "Lowtemp1": self.type = self.LOWTEMP1 elif type == "Hightemp1": self.type = self.HIGHTEMP1 elif type == "Picon1": self.type = self.PICON1 elif type == "Skytext1": self.type = self.SKYTEXT1 elif type == "Precip1": self.type = self.PRECIP1 # day 2 # elif type == "Date2": self.type = self.DATE2 elif type == "Shortdate2": self.type = self.SHORTDATE2 elif type == "Day2": self.type = self.DAY2 elif type == "Shortday2": self.type = self.SHORTDAY2 elif type == "Temp2": self.type = self.TEMP2 elif type == "Lowtemp2": self.type = self.LOWTEMP2 elif type == "Hightemp2": self.type = self.HIGHTEMP2 elif type == "Picon2": self.type = self.PICON2 elif type == "Skytext2": self.type = self.SKYTEXT2 elif type == "Precip2": self.type = self.PRECIP2 # day 3 # elif type == "Date3": self.type = self.DATE3 elif type == "Shortdate3": self.type = self.SHORTDATE3 elif type == "Day3": self.type = self.DAY3 elif type == "Shortday3": self.type = self.SHORTDAY3 elif type == "Temp3": self.type = self.TEMP3 elif type == "Lowtemp3": self.type = self.LOWTEMP3 elif type == "Hightemp3": self.type = self.HIGHTEMP3 elif type == "Picon3": self.type = self.PICON3 elif type == "Skytext3": self.type = self.SKYTEXT3 elif type == "Precip3": self.type = self.PRECIP3 # day 4 # elif type == "Date4": self.type = self.DATE4 elif type == "Shortdate4": self.type = self.SHORTDATE4 elif type == "Day4": self.type = self.DAY4 elif type == "Shortday4": self.type = self.SHORTDAY4 elif type == "Temp4": self.type = self.TEMP4 elif type == "Lowtemp4": self.type = self.LOWTEMP4 elif type == "Hightemp4": self.type = self.HIGHTEMP4 elif type == "Picon4": self.type = self.PICON4 elif type == "Skytext4": self.type = self.SKYTEXT4 elif type == "Precip4": self.type = self.PRECIP4 self.iConsole = iConsole() self.poll_interval = time_update_ms self.poll_enabled = True
def __init__(self, type): Poll.__init__(self) Converter.__init__(self, type) self.currPID = 1000 if type == "CAID": self.type = self.CAID elif type == "PID": self.type = self.PID elif type == "ProvID": self.type = self.PROV elif type == "Delay": self.type = self.DELAY elif type == "Host": self.type = self.HOST elif type == "Net": self.type = self.IS_NET elif type == "Emu": self.type = self.IS_EMU elif type == "CryptInfo": self.type = self.CRYPT elif type == "CryptInfo2": self.type = self.CRYPT2 elif type == "BetaCrypt": self.type = self.BETA elif type == "ConaxCrypt": self.type = self.CONAX elif type == "CrwCrypt": self.type = self.CRW elif type == "DreamCrypt": self.type = self.DRE elif type == "ExsCrypt": self.type = self.EXS elif type == "IrdCrypt": self.type = self.IRD elif type == "NagraCrypt": self.type = self.NAGRA elif type == "NdsCrypt": self.type = self.NDS elif type == "SecaCrypt": self.type = self.SECA elif type == "ViaCrypt": self.type = self.VIA elif type == "PwuCrypt": self.type = self.PWR elif type == "VrmCrypt": self.type = self.VERI elif type == "BetaEcm": self.type = self.BETA_C elif type == "ConaxEcm": self.type = self.CONAX_C elif type == "CrwEcm": self.type = self.CRW_C elif type == "DreamEcm": self.type = self.DRE_C elif type == "ExsEcm": self.type = self.EXS_C elif type == "IrdEcm": self.type = self.IRD_C elif type == "NagraEcm": self.type = self.NAGRA_C elif type == "NdsEcm": self.type = self.NDS_C elif type == "SecaEcm": self.type = self.SECA_C elif type == "ViaEcm": self.type = self.VIA_C elif type == "PwuEcm": self.type = self.PWR_C elif type == "VrmEcm": self.type = self.VERI_C elif type == "TanCrypt": self.type = self.TAN elif type == "TanEcm": self.type = self.TAN_C elif type == "BisCrypt": self.type = self.BISS elif type == "BisEcm": self.type = self.BISS_C elif type == "Crd": self.type = self.CRD elif type == "CrdTxt": self.type = self.CRDTXT elif type == "IsFta": self.type = self.IS_FTA elif type == "IsCrypted": self.type = self.IS_CRYPTED elif type == "Short": self.type = self.SHORT elif type == "Default" or type == "" or type == None or type == "%": self.type = self.ALL elif type == "emuname": self.type = self.SOFTCAMNAME elif type == "emuFullName": self.type = self.SOFTCAMFULLNAME elif type == "caids": self.type = self.CAIDS elif type == "UseCFG": self.type = self.USE_CFG elif type == "ecmfile": self.type = self.ECMFILECONTENT else: self.type = self.FORMAT self.sfmt = type[:] self.systemTxtCaids = { "26": "BiSS", "01": "Seca Mediaguard", "06": "Irdeto", "17": "BetaCrypt", "55": "BulCrypt", "05": "Viaccess", "18": "Nagravision", "09": "NDS-Videoguard", "0B": "Conax", "0D": "Cryptoworks", "4A": "DRE-Crypt", "27": "ExSet", "0E": "PowerVu", "10": "Tandberg", "22": "Codicrypt", "07": "DigiCipher", "56": "Verimatrix", "4B": "DG-Crypt", "A1": "Rosscrypt" } self.systemCaids = { "26": "BiSS", "01": "SEC", "06": "IRD", "55": "BET", "17": "BET", "05": "VIA", "18": "NAG", "09": "NDS", "0B": "CON", "0D": "CRW", "27": "EXS", "4B": "DRE", "4A": "DRE", "0E": "PWR", "10": "TAN", "56": "VERI" }
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) self.poll_interval = 2*1000 self.poll_enabled = True self.list = [] if (type == "TunerInfo"): self.type = self.TUNERINFO elif (type == "CamName"): self.type = self.CAMNAME elif (type == "Number"): self.type = self.NUMBER global servicelist if len(servicelist) == 0: initServiceList() elif (type == "EcmInfo"): self.type = self.ECMINFO elif (type == "CaidInfo"): self.type = self.CAIDINFO elif (type == "IrdCrypt"): self.type = self.IRDCRYPT elif (type == "SecaCrypt"): self.type = self.SECACRYPT elif (type == "NagraCrypt"): self.type = self.NAGRACRYPT elif (type == "ViaCrypt"): self.type = self.VIACRYPT elif (type == "ConaxCrypt"): self.type = self.CONAXCRYPT elif (type == "BetaCrypt"): self.type = self.BETACRYPT elif (type == "CrwCrypt"): self.type = self.CRWCRYPT elif (type == "DreamCrypt"): self.type = self.DREAMCRYPT elif (type == "NdsCrypt"): self.type = self.NDSCRYPT elif (type == "IrdEcm"): self.type = self.IRDECM elif (type == "SecaEcm"): self.type = self.SECAECM elif (type == "NagraEcm"): self.type = self.NAGRAECM elif (type == "ViaEcm"): self.type = self.VIAECM elif (type == "ConaxEcm"): self.type = self.CONAXECM elif (type == "BetaEcm"): self.type = self.BETAECM elif (type == "CrwEcm"): self.type = self.CRWECM elif (type == "DreamEcm"): self.type = self.DREAMECM elif (type == "NdsEcm"): self.type = self.NDSECM elif (type == "Fta"): self.type = self.FTA elif (type == "Emu"): self.type = self.EMU elif (type == "Crd"): self.type = self.CRD elif (type == "Net"): self.type = self.NET elif (type == "TunerInfoBP"): self.type = self.TUNERINFOBP
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) if type == "apid": self.type = self.apid elif type == "vpid": self.type = self.vpid elif type == "sid": self.type = self.sid elif type == "onid": self.type = self.onid elif type == "tsid": self.type = self.tsid elif type == "prcpid": self.type = self.prcpid elif type == "caids": self.type = self.caids elif type == "pmtpid": self.type = self.pmtpid elif type == "txtpid": self.type = self.txtpid elif type == "tsid": self.type = self.tsid elif type == "xres": self.type = self.xres elif type == "yres": self.type = self.yres elif type == "atype": self.type = self.atype elif type == "vtype": self.type = self.vtype elif type == "avtype": self.type = self.avtype elif type == "fps": self.type = self.fps elif type == "tbps": self.type = self.tbps elif type == "VideoWidth": self.type = self.XRES elif type == "VideoHeight": self.type = self.YRES elif type == "IsWidescreen": self.type = self.IS_WIDESCREEN elif type == "HasTelext": self.type = self.HAS_TELETEXT elif type == "IsMultichannel": self.type = self.IS_MULTICHANNEL elif type == "IsCrypted": self.type = self.IS_CRYPTED elif type == "IsFta": self.type = self.IS_FTA elif type == "SubservicesAvailable": self.type = self.SUBSERVICES_AVAILABLE elif type == "AudioTracksAvailable": self.type = self.AUDIOTRACKS_AVAILABLE elif type == "SubtitlesAvailable": self.type = self.SUBTITLES_AVAILABLE elif type == "Editmode": self.type = self.EDITMODE elif type == "Framerate": self.type = self.FRAMERATE else: self.type = self.format self.sfmt = type[:] self.poll_interval = 1000 self.poll_enabled = True
def __init__(self): Poll.__init__(self) self.__callbacks = [] self.__curr_info = self.getCpusInfo() self.poll_interval = 500
def __init__(self, type): Poll.__init__(self) Converter.__init__(self, type) self.poll_interval = 30 * 1000 self.poll_enabled = True
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) if type == "apid": self.type = self.apid elif type == "vpid": self.type = self.vpid elif type == "sid": self.type = self.sid elif type == "onid": self.type = self.onid elif type == "tsid": self.type = self.tsid elif type == "prcpid": self.type = self.prcpid elif type == "caids": self.type = self.caids elif type == "pmtpid": self.type = self.pmtpid elif type == "txtpid": self.type = self.txtpid elif type == "tsid": self.type = self.tsid elif type == "xres": self.type = self.xres elif type == "yres": self.type = self.yres elif type == "gamma": self.type = self.gamma elif type == "atype": self.type = self.atype elif type == "vtype": self.type = self.vtype elif type == "avtype": self.type = self.avtype elif type == "fps": self.type = self.fps elif type == "tbps": self.type = self.tbps elif type == "vsize": self.type = self.vsize elif type == "ttype": self.type = self.ttype elif type == "VideoWidth": self.type = self.XRES elif type == "VideoHeight": self.type = self.YRES elif type == "IsWidescreen": self.type = self.IS_WIDESCREEN elif type == "HasTelext": self.type = self.HAS_TELETEXT elif type == "IsMultichannel": self.type = self.IS_MULTICHANNEL elif type == "IsCrypted": self.type = self.IS_CRYPTED elif type == "IsFta": self.type = self.IS_FTA elif type == "HasHBBTV": self.type = self.HAS_HBBTV elif type == "SubservicesAvailable": self.type = self.SUBSERVICES_AVAILABLE elif type == "AudioTracksAvailable": self.type = self.AUDIOTRACKS_AVAILABLE elif type == "SubtitlesAvailable": self.type = self.SUBTITLES_AVAILABLE elif type == "Editmode": self.type = self.EDITMODE elif type == "Framerate": self.type = self.FRAMERATE elif type == "IsSatellite": self.type = self.IS_SATELLITE elif type == "IsSatelliteS": self.type = self.IS_SATELLITE_S elif type == "IsSatelliteS2": self.type = self.IS_SATELLITE_S2 elif type == "IsCable": self.type = self.IS_CABLE elif type == "IsCableC": self.type = self.IS_CABLE_C elif type == "IsCableC2": self.type = self.IS_CABLE_C2 elif type == "IsTerrestrial": self.type = self.IS_TERRESTRIAL elif type == "IsTerrestrialT": self.type = self.IS_TERRESTRIAL_T elif type == "IsTerrestrialT2": self.type = self.IS_TERRESTRIAL_T2 elif type == "IsStreamTV": self.type = self.IS_STREAMTV elif type == "IsVolume": self.type = self.volume elif type == "IsVolumeData": self.type = self.volumedata else: self.type = self.format self.sfmt = type[:] self.poll_interval = 1000 self.poll_enabled = True
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) self.type = type self.poll_interval = 1000 self.poll_enabled = True self.info_fields = { # Field combinations accessible from skin "All": ( ( # config.usage.show_cryptoinfo.value <= 0 "ProviderName", "TransponderInfo", "TransponderName", "NewLine", "CryptoBar", "CryptoCurrentSource", "NewLine", "CryptoSpecial", "VideoCodec", "ResolutionString", ), ( # config.usage.show_cryptoinfo.value > 0 "ProviderName", "TransponderInfo", "TransponderName", "NewLine", "CryptoBar", "CryptoSpecial", "NewLine", "PIDInfo", "VideoCodec", "ResolutionString", )), "CryptoInfo": ( ( # config.usage.show_cryptoinfo.value <= 0 "CryptoBar", "CryptoCurrentSource", "CryptoSpecial", ), ( # config.usage.show_cryptoinfo.value > 0 "CryptoBar", "CryptoSpecial", )), "ServiceInfo": ( "ProviderName", "TunerSystem", "TransponderFrequency", "TransponderPolarization", "TransponderSymbolRate", "TransponderFEC", "TransponderModulation", "OrbitalPosition", "TransponderName", "VideoCodec", "ResolutionString", ), "TransponderInfo": ( ( # not feraw "StreamURLInfo", ), ( # feraw and "DVB-T" not in feraw.get("tuner_type", "") "TunerSystem", "TransponderFrequencyMHz", "TransponderPolarization", "TransponderSymbolRate", "TransponderFEC", "TransponderModulation", "OrbitalPosition", "TransponderInfoMisPls", ), ( # feraw and "DVB-T" in feraw.get("tuner_type", "") "TunerSystem", "TerrestrialChannelNumber", "TransponderFrequencyMHz", "TransponderPolarization", "TransponderSymbolRate", "TransponderFEC", "TransponderModulation", "OrbitalPosition", )), "TransponderInfo2line": ( "ProviderName", "TunerSystem", "TransponderName", "NewLine", "TransponderFrequencyMHz", "TransponderPolarization", "TransponderSymbolRate", "TransponderModulationFEC", ), "User": (), } self.ca_table = ( ("CryptoCaidBetatAvailable", "B", False), ("CryptoCaidIrdetoAvailable", "I", False), ("CryptoCaidNagraAvailable", "N", False), ("CryptoCaidSecaAvailable", "S", False), ("CryptoCaidTandbergAvailable", "T", False), ("CryptoCaidViaAvailable", "V", False), ("CryptoCaidBissAvailable", "BI", False), ("CryptoCaidBulCrypt1Available", "BU", False), ("CryptoCaidBulCrypt2Available", "BU", False), ("CryptoCaidConaxAvailable", "CO", False), ("CryptoCaidCryptoWAvailable", "CW", False), ("CryptoCaidDre3Available", "DC", False), ("CryptoCaidDreAvailable", "DC", False), ("CryptoCaidNDSAvailable", "ND", False), ("CryptoCaidPowerVuAvailable", "PV", False), ("CryptoCaidVerimatrixAvailable", "VM", False), ("CryptoCaidBetaSelected", "B", True), ("CryptoCaidIrdetoSelected", "I", True), ("CryptoCaidNagraSelected", "N", True), ("CryptoCaidSecaSelected", "S", True), ("CryptoCaidTandbergSelected", "T", True), ("CryptoCaidViaSelected", "V", True), ("CryptoCaidBissSelected", "BI", True), ("CryptoCaidBulCrypt1Selected", "BU", True), ("CryptoCaidBulCrypt2Selected", "BU", True), ("CryptoCaidConaxSelected", "CO", True), ("CryptoCaidCryptoWSelected", "CW", True), ("CryptoCaidDre3Selected", "DC", True), ("CryptoCaidDreSelected", "DC", True), ("CryptoCaidNDSSelected", "ND", True), ("CryptoCaidPowerVuSelected", "PV", True), ("CryptoCaidVerimatrixSelected", "VM", True), ) self.type = self.type.split(',') if self.type[0] == "User": self.info_fields[self.type[0]] = tuple(self.type[1:]) self.type = self.type[0] self.ecmdata = GetEcmInfo() self.feraw = self.fedata = self.updateFEdata = None self.recursionCheck = set() self.cryptocolors = parameters.get( "PliExtraInfoCryptoColors", (0x004C7D3F, 0x009F9F9F, 0x00EEEE00, 0x00FFFFFF))
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) self.caid_default = [] self.type = type.split(',') self.maincolor = self.convert_color(self.type[0].strip()) self.emmcolor = self.convert_color(self.type[1].strip()) self.ecmcolor = self.convert_color(self.type[2].strip()) if len(self.type) > 4: self.caid_default = self.type[-1].split() if len(self.type) == 3: self.caid_default = [ 'S', 'V', 'I', 'ND', 'CO', 'PV', 'N', 'EX', 'VM', 'BI' ] self.txt_caids_a = { '01': 'S', '05': 'V', '06': 'I', '07': 'DC', '09': 'ND', '0B': 'CO', '0D': 'CW', '0E': 'PV', '10': 'TA', '18': 'N', '22': 'CC', '26': 'BI', '27': 'EX', '4B': 'T', '54': 'G', '55': 'BC', '56': 'VM', '7B': 'D', 'A1': 'RC' } self.txt_caids_b = {'17': 'VM'} self.txt_caids_c = {'02': 'BE', '22': 'BE', '62': 'BE'} self.txt_caids_d = { '20': 'AC', 'BF': 'SP', 'D0': 'XC', 'D1': 'XC', 'D4': 'OC', 'E0': 'D', 'E1': 'D', '60': 'SC', '61': 'SC', '63': 'SC', '70': 'DC', 'EA': 'CG', 'EE': 'BC', 'FC': 'P' } elif self.type[3].strip() == "Short": self.caid_default = [ 'SEC', 'VIA', 'IRD', 'NDS', 'CON', 'PVU', 'NAG', 'EXS', 'VRM', 'BiSS' ] self.txt_caids_a = { '01': 'SEC', '05': 'VIA', '06': 'IRD', '07': 'DIC', '09': 'NDS', '0B': 'CON', '0D': 'CRW', '0E': 'PVU', '10': 'TAN', '18': 'NAG', '22': 'COD', '26': 'BiSS', '27': 'EXS', '4B': 'TOP', '54': 'GOS', '55': 'BUL', '56': 'VRM', '7B': 'DRE', 'A1': 'ROS' } self.txt_caids_b = {'17': 'VRM'} self.txt_caids_c = {'02': 'BET', '22': 'BET', '62': 'BET'} self.txt_caids_d = { '20': 'ACR', 'BF': 'SKY', 'D0': 'XCR', 'D1': 'XCR', 'D4': 'OCR', 'E0': 'DRE', 'E1': 'DRE', '60': 'SCR', '61': 'SCR', '63': 'SCR', '70': 'DCR', 'EA': 'CGU', 'EE': 'BUL', 'FC': 'PAN' } elif self.type[3].strip() == "Full": self.caid_default = [ 'SECA', 'VIACCESS', 'IRDETO', 'VIDEOGUARD', 'CONAX', 'POWERVU', 'NAGRAVISION', 'EXSET', 'VERIMATRIX', 'BiSS' ] self.txt_caids_a = { '01': 'MEDIAGUARD', '05': 'VIACCESS', '06': 'IRDETO', '07': 'DIGICIPHER', '09': 'VIDEOGUARD', '0B': 'CONAX', '0D': 'CRYPTOWORKS', '0E': 'POWERVU', '10': 'TANDBERG', '18': 'NAGRAVISION', '22': 'CODICRYPT', '26': 'BiSS', '27': 'EXSET', '4B': 'TOPVELL', '54': 'GOSPELL', '55': 'BULCRYPT', '56': 'VERIMATRIX', '7B': 'DRE-CRYPT', 'A1': 'ROSSCRYPT' } self.txt_caids_b = {'17': 'VERIMATRIX'} self.txt_caids_c = { '02': 'BETACRYPT', '22': 'BETACRYPT', '62': 'BETACRYPT' } self.txt_caids_d = { '20': 'ALPHACRYPT', 'BF': 'SKYPILOT', 'D0': 'X-CRYPT', 'D1': 'X-CRYPT', 'D4': 'OMNICRYPT', 'E0': 'DRE-CRYPT', 'E1': 'DRE-CRYPT', '60': 'SKYCRYPT', '61': 'SKYCRYPT', '63': 'SKYCRYPT', '70': 'DREAMCRYPT', 'EA': 'CRYPTOGUARD', 'EE': 'BULCRYPT', 'FC': 'PANACCESS' } self.poll_interval = 1000 self.poll_enabled = True
def __init__(self, type): Poll.__init__(self) Converter.__init__(self, type) if type == 'EndTime': self.type = self.TYPE_ENDTIME self.poll_enabled = True
def __init__(self, type): Poll.__init__(self) Converter.__init__(self, type) if type == 'CAID': self.type = self.CAID elif type == 'PID': self.type = self.PID elif type == 'ProvID': self.type = self.PROV elif type == 'Delay': self.type = self.DELAY elif type == 'Host': self.type = self.HOST elif type == 'Net': self.type = self.IS_NET elif type == 'Emu': self.type = self.IS_EMU elif type == 'CryptInfo': self.type = self.CRYPT elif type == 'CryptInfo2': self.type = self.CRYPT2 elif type == 'BetaCrypt': self.type = self.BETA elif type == 'ConaxCrypt': self.type = self.CONAX elif type == 'CrwCrypt': self.type = self.CRW elif type == 'TanCrypt': self.type = self.TAN elif type == 'DreamCrypt': self.type = self.DRE elif type == 'PowerVuCrypt': self.type = self.PWV elif type == 'IrdCrypt': self.type = self.IRD elif type == 'NagraCrypt': self.type = self.NAGRA elif type == 'NdsCrypt': self.type = self.NDS elif type == 'GeiCrypt': self.type = self.GEI elif type == 'SecaCrypt': self.type = self.SECA elif type == 'ViaCrypt': self.type = self.VIA elif type == 'BetaEcm': self.type = self.BETA_C elif type == 'ConaxEcm': self.type = self.CONAX_C elif type == 'CrwEcm': self.type = self.CRW_C elif type == 'DreamEcm': self.type = self.DRE_C elif type == 'TanEcm': self.type = self.TAN_C elif type == 'PowerVuEcm': self.type = self.PWV_C elif type == 'IrdEcm': self.type = self.IRD_C elif type == 'NagraEcm': self.type = self.NAGRA_C elif type == 'NdsEcm': self.type = self.NDS_C elif type == 'GeiEcm': self.type = self.GEI_C elif type == 'SecaEcm': self.type = self.SECA_C elif type == 'ViaEcm': self.type = self.VIA_C elif type == 'BisCrypt': self.type = self.BISS elif type == 'BisEcm': self.type = self.BISS_C elif type == 'Crd': self.type = self.CRD elif type == 'CrdTxt': self.type = self.CRDTXT elif type == 'IsFta': self.type = self.IS_FTA elif type == 'IsCrypted': self.type = self.IS_CRYPTED elif type == 'Short': self.type = self.SHORT elif type == 'Default' or type == '' or type == None or type == '%': self.type = self.ALL else: self.type = self.FORMAT self.sfmt = type[:] self.systemTxtCaids = {'26': 'BiSS', '01': 'Seca Mediaguard', '06': 'Irdeto', '17': 'BetaCrypt', '05': 'Viacces', '18': 'Nagravision', '09': 'NDS-Videoguard', '0B': 'Conax', '0D': 'Cryptoworks', '4A': 'DRE-Crypt', '0E': 'PowerVu', '22': 'Codicrypt', '47': 'General', '56': 'Verimatrix', '10': 'Tandberg', '7B': 'DRE-Crypt', 'A1': 'Rosscrypt'} self.systemCaids = {'26': 'BiSS', '01': 'SECA', '47': 'GEI', '06': 'IRD', '17': 'BET', '05': 'VIA', '18': 'NAG', '09': 'NDS', '0B': 'CON', '0D': 'CRW', '0E': 'PWV', '10': 'TAN', '7B': 'DRE', '4A': 'DRE'} return
def matchName(self, stListCopy, pollStList, date): index = 1 # 0 for attandance type = 0 date = date tempList = pollStList.copy() pollNameAndAnswer = [] if len(tempList) > 1: if len(tempList[1][1]) > 0: pollNameAndAnswer = self.whichPollMatch(tempList[1][1]) type = 1 Bys = stListCopy.copy() for studentInstance in Bys: if isinstance(studentInstance, Student): for data in tempList: if isinstance(data, str): name = data else: name = data[0] if name == "*****@*****.**" and studentInstance.getStudentLastName( ) == "ORAK": try: for eleman in tempList: isimStudent = eleman[0] if isimStudent == name: tempList.remove(eleman) if type == 0: logAttandance = LogAttendance(date) studentInstance.getAttendanceLogs( ).append(logAttandance) else: poll = Poll(pollNameAndAnswer[0][0], data[1], pollNameAndAnswer[0][1], data[2], date) studentInstance.getPollLog().append( poll) # print(index, studentInstance.getStudentFullName(), name) ind = Bys.index(studentInstance) Bys[ind] = None index = index + 1 except: a = 0 Ratio = fuzz.token_set_ratio( studentInstance.getStudentFullName(), name) if Ratio == 100: try: for eleman in tempList: isimStudent = eleman[0] if isimStudent == name: tempList.remove(eleman) if type == 0: logAttandance = LogAttendance(date) studentInstance.getAttendanceLogs( ).append(logAttandance) # print(index, "ciktim", studentInstance.getStudentFullName(), name) ind = Bys.index(studentInstance) Bys[ind] = None index = index + 1 else: poll = Poll(pollNameAndAnswer[0][0], data[1], pollNameAndAnswer[0][1], data[2], date) studentInstance.getPollLog().append( poll) # print(index, "ciktim", studentInstance.getStudentFullName(), name) ind = Bys.index(studentInstance) Bys[ind] = None index = index + 1 except: a = 0 elif Ratio >= 70: # print(index, studentInstance.getStudentFullName(), name, Ratio) last = name.split(" ") RatioLN = fuzz.token_set_ratio( studentInstance.getStudentLastName(), last[len(last) - 1]) if RatioLN > 80: # print(index, studentInstance.getStudentFullName(), name, RatioLN) full = studentInstance.getStudentFullName().split( " ") if RatioLN == 100: if name == "AYSE KARAHASAN": try: for eleman in tempList: isimStudent = eleman[0] if isimStudent == name: tempList.remove(eleman) if type == 0: logAttandance = LogAttendance( date) studentInstance.getAttendanceLogs( ).append(logAttandance) # print(index, studentInstance.getStudentFullName(), name) ind = Bys.index( studentInstance) Bys[ind] = None index = index + 1 else: poll = Poll( pollNameAndAnswer[0] [0], data[1], pollNameAndAnswer[0] [1], data[2], date) studentInstance.getPollLog( ).append(poll) # print(index, studentInstance.getStudentFullName(), name) ind = Bys.index( studentInstance) Bys[ind] = None index = index + 1 except: a = 0 if len(last) == 2 and len(full) == 2: RatioFN = fuzz.token_set_ratio( studentInstance.getStudentFirstName(), last[0]) if RatioFN > 95: try: for eleman in tempList: isimStudent = eleman[0] if isimStudent == name: tempList.remove(eleman) if type == 0: logAttandance = LogAttendance( date) studentInstance.getAttendanceLogs( ).append(logAttandance) # print(index, studentInstance.getStudentFullName(), name) ind = Bys.index( studentInstance) Bys[ind] = None index = index + 1 else: poll = Poll( pollNameAndAnswer[0] [0], data[1], pollNameAndAnswer[0] [1], data[2], date) studentInstance.getPollLog( ).append(poll) # print(index, studentInstance.getStudentFullName(), name) ind = Bys.index( studentInstance) Bys[ind] = None index = index + 1 except: a = 0 if len(last) == 2 and len(full) == 3: InstanceFN = (str)( studentInstance.getStudentFirstName( )).split(" ") RatioFN1 = fuzz.token_set_ratio( InstanceFN[0], last[0]) RatioFN2 = fuzz.token_set_ratio( InstanceFN[1], last[0]) if (RatioFN1 + RatioFN2) / 2 > 50: try: for eleman in tempList: isimStudent = eleman[0] if isimStudent == name: tempList.remove(eleman) if type == 0: logAttandance = LogAttendance( date) studentInstance.getAttendanceLogs( ).append(logAttandance) # print(index, studentInstance.getStudentFullName(), name) ind = Bys.index( studentInstance) Bys[ind] = None index = index + 1 else: poll = Poll( pollNameAndAnswer[0] [0], data[1], pollNameAndAnswer[0] [1], data[2], date) studentInstance.getPollLog( ).append(poll) # print(index, studentInstance.getStudentFullName(), name) ind = Bys.index( studentInstance) Bys[ind] = None index = index + 1 except: a = 0 if len(last) == 3 and len(full) == 3: Ratiofn3Fuzz = fuzz.partial_ratio( studentInstance.getStudentFullName(), name) Ratio3 = fuzz.token_set_ratio( studentInstance.getStudentFullName(), name) if Ratio3 >= 80: try: for eleman in tempList: isimStudent = eleman[0] if isimStudent == name: tempList.remove(eleman) if type == 0: logAttandance = LogAttendance( date) studentInstance.getAttendanceLogs( ).append(logAttandance) # print(index, studentInstance.getStudentFullName(), name) ind = Bys.index( studentInstance) Bys[ind] = None index = index + 1 else: poll = Poll( pollNameAndAnswer[0] [0], data[1], pollNameAndAnswer[0] [1], data[2], date) studentInstance.getPollLog( ).append(poll) # print(index, studentInstance.getStudentFullName(), name) ind = Bys.index( studentInstance) Bys[ind] = None index = index + 1 except: a = 0
def night(self): self.context.bot.send_sticker( chat_id=self.group_chat_id, sticker= "CAACAgQAAxkBAAEBTvRfVoDkyT_4cuxWVkyG3sSE5YwMZwACTwAD1ul3K7fApYkW8UiOGwQ" ) language = self.group_data["lang"] self.state = GameState.Night if self.day_night_counter == 1 and len(self.mafias) > 1: with codecs.open(os.path.join("Lang", language, "FirstNightDesc"), 'r', encoding='utf8') as file: self.context.bot.send_message(chat_id=self.group_chat_id, text=file.read()) self.notify_mafias() for i in range(2): if self.is_finished: break with codecs.open(os.path.join("Lang", language, f"Night{30 - i * 15}sec"), 'r', encoding='utf8') as file: self.context.bot.send_message(chat_id=self.group_chat_id, text=file.read()) time.sleep(15) else: with codecs.open(os.path.join("Lang", language, "NightStart"), 'r', encoding='utf8') as file: self.context.bot.send_message(chat_id=self.group_chat_id, text=file.read()) for player in self.get_alive_players(): if player.mafia_rank == 1: with codecs.open(os.path.join("Lang", language, "MafiaVoteNight"), 'r', encoding='utf8') as file: poll = Poll(file.read() + player.emoji, self.get_citizens(), player.user_id, "night") self.messages.update( {"Mafia_shot": poll.send_poll(self.context)}) elif player.role == Roles.Sniper: if self.sniper_shots > 0: with codecs.open(os.path.join("Lang", language, "SniperVoteNight"), 'r', encoding='utf8') as file: poll = Poll(file.read() + player.emoji, self.get_players_without_sniper(), player.user_id, "night") self.messages.update( {"Sniper": poll.send_poll(self.context)}) else: with codecs.open(os.path.join("Lang", language, "SniperEnd"), 'r', encoding='utf8') as file: self.context.bot.send_message( chat_id=player.user_id, text=file.read()) elif player.role == Roles.Detective: with codecs.open(os.path.join("Lang", language, "DetectiveVoteNight"), 'r', encoding='utf8') as file: poll = Poll(file.read() + player.emoji, self.get_players_without_detect(), player.user_id, "night") self.messages.update( {"Detective": poll.send_poll(self.context)}) elif player.role == Roles.Doctor: with codecs.open(os.path.join("Lang", language, "DoctorVoteNight"), 'r', encoding='utf8') as file: poll = Poll(file.read() + player.emoji, self.get_alive_players(), player.user_id, "night") self.messages.update( {"Doctor": poll.send_poll(self.context)}) for i in range(4): with codecs.open(os.path.join("Lang", language, f"Night{60 - i * 15}sec"), 'r', encoding='utf8') as file: self.context.bot.send_message(chat_id=self.group_chat_id, text=file.read()) time.sleep(15) self.night_result()
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) if type == "city": self.type = self.city elif type == "country": self.type = self.country elif type == "direction": self.type = self.direction elif type == "speed": self.type = self.speed elif type == "humidity": self.type = self.humidity elif type == "visibility": self.type = self.visibility elif type == "pressure": self.type = self.pressure elif type == "pressurenm": self.type = self.pressurenm elif type == "text": self.type = self.wtext elif type == "temp": self.type = self.temp elif type == "picon": self.type = self.picon elif type == "text2": self.type = self.wtext2 elif type == "templow2": self.type = self.templow2 elif type == "temphigh2": self.type = self.temphigh2 elif type == "day2": self.type = self.day2 elif type == "date2": self.type = self.date2 elif type == "picon2": self.type = self.picon2 elif type == "text3": self.type = self.wtext3 elif type == "templow3": self.type = self.templow3 elif type == "temphigh3": self.type = self.temphigh3 elif type == "day3": self.type = self.day3 elif type == "date3": self.type = self.date3 elif type == "picon3": self.type = self.picon3 elif type == "text4": self.type = self.wtext4 elif type == "templow4": self.type = self.templow4 elif type == "temphigh4": self.type = self.temphigh4 elif type == "day4": self.type = self.day4 elif type == "date4": self.type = self.date4 elif type == "picon4": self.type = self.picon4 elif type == "text5": self.type = self.wtext5 elif type == "templow5": self.type = self.templow5 elif type == "temphigh5": self.type = self.temphigh5 elif type == "day5": self.type = self.day5 elif type == "date5": self.type = self.date5 elif type == "picon5": self.type = self.picon5 self.poll_interval = self.time_update_ms self.poll_enabled = True
def __init__(self, type): Poll.__init__(self) Converter.__init__(self, type) self.type = type self.getLists() self.systemCaids = {'06': 'I', '01': 'S', '18': 'N', '05': 'V', '0B': 'CO', '17': 'BC', '0D': 'CW', '4A': 'DC', '55': 'BG', '09': 'NDS'} self.poll_interval = 2000 self.poll_enabled = True if type == 'Number': self.type = self.NUMBER elif type == 'EcmInfo': self.type = self.ECMINFO elif type == 'IrdCrypt': self.type = self.IRDCRYPT elif type == 'SecaCrypt': self.type = self.SECACRYPT elif type == 'NagraCrypt': self.type = self.NAGRACRYPT elif type == 'ViaCrypt': self.type = self.VIACRYPT elif type == 'ConaxCrypt': self.type = self.CONAXCRYPT elif type == 'BetaCrypt': self.type = self.BETACRYPT elif type == 'CrwCrypt': self.type = self.CRWCRYPT elif type == 'DreamCrypt': self.type = self.DREAMCRYPT elif type == 'NdsCrypt': self.type = self.NDSCRYPT elif type == 'IrdEcm': self.type = self.IRDECM elif type == 'SecaEcm': self.type = self.SECAECM elif type == 'NagraEcm': self.type = self.NAGRAECM elif type == 'ViaEcm': self.type = self.VIAECM elif type == 'ConaxEcm': self.type = self.CONAXECM elif type == 'BetaEcm': self.type = self.BETAECM elif type == 'CrwEcm': self.type = self.CRWECM elif type == 'DreamEcm': self.type = self.DREAMECM elif type == 'NdsEcm': self.type = self.NDSECM elif type == 'OnlineTest': self.type = self.ONLINETEST else: self.type = self.ALL
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) if type == "city": self.type = self.city elif type == "city_title": self.type = self.city_title elif type == "country": self.type = self.country elif type == "direction": self.type = self.direction elif type == "speed": self.type = self.speed elif type == "speed_ms": self.type = self.speed_ms elif type == "humidity": self.type = self.humidity elif type == "feels": self.type = self.feels elif type == "visibility": self.type = self.visibility elif type == "pressure": self.type = self.pressure elif type == "pressurenm": self.type = self.pressurenm elif type == "text": self.type = self.wtext elif type == "temp": self.type = self.temp elif type == "sunrise": self.type = self.sunrise elif type == "sunset": self.type = self.sunset elif type == "geolat": self.type = self.geolat elif type == "geolong": self.type = self.geolong elif type == "picon": self.type = self.picon elif type == "fdate0": self.type = self.fdate0 elif type == "fdate1": self.type = self.fdate1 elif type == "fdate2": self.type = self.fdate2 elif type == "fdate3": self.type = self.fdate3 elif type == "fdate4": self.type = self.fdate4 elif type == "fweekday0": self.type = self.fweekday0 elif type == "fweekday1": self.type = self.fweekday1 elif type == "fweekday2": self.type = self.fweekday2 elif type == "fweekday3": self.type = self.fweekday3 elif type == "fweekday4": self.type = self.fweekday4 elif type == "ffulldate0": self.type = self.ffulldate0 elif type == "ffulldate1": self.type = self.ffulldate1 elif type == "ffulldate2": self.type = self.ffulldate2 elif type == "ffulldate3": self.type = self.ffulldate3 elif type == "ffulldate4": self.type = self.ffulldate4 elif type == "ftemp0": self.type = self.ftemp0 elif type == "ftemp1": self.type = self.ftemp1 elif type == "ftemp2": self.type = self.ftemp2 elif type == "ftemp3": self.type = self.ftemp3 elif type == "ftemp4": self.type = self.ftemp4 elif type == "ftext0": self.type = self.ftext0 elif type == "ftext1": self.type = self.ftext1 elif type == "ftext2": self.type = self.ftext2 elif type == "ftext3": self.type = self.ftext3 elif type == "ftext4": self.type = self.ftext4 elif type == "fpicon0": self.type = self.fpicon0 elif type == "fpicon1": self.type = self.fpicon1 elif type == "fpicon2": self.type = self.fpicon2 elif type == "fpicon3": self.type = self.fpicon3 elif type == "fpicon4": self.type = self.fpicon4 elif type == "fshortdate0": self.type = self.fshortdate0 elif type == "fshortdate1": self.type = self.fshortdate1 elif type == "fshortdate2": self.type = self.fshortdate2 elif type == "fshortdate3": self.type = self.fshortdate3 elif type == "fshortdate4": self.type = self.fshortdate4 self.iConsole = iConsole() self.poll_interval = time_update_ms self.poll_enabled = True
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) self.type = type self.poll_interval = 1000 self.poll_enabled = True self.caid_data = (('0x100', '0x1ff', 'Seca', 'S', True), ('0x500', '0x5ff', 'Via', 'V', True), ('0x600', '0x6ff', 'Irdeto', 'I', True), ('0x900', '0x9ff', 'NDS', 'Nd', True), ('0xb00', '0xbff', 'Conax', 'Co', True), ('0xd00', '0xdff', 'CryptoW', 'Cw', True), ('0xe00', '0xeff', 'PowerVU', 'P', False), ('0x1700', '0x17ff', 'Beta', 'B', True), ('0x1800', '0x18ff', 'Nagra', 'N', True), ('0x2600', '0x2600', 'Biss', 'Bi', False), ('0x4ae0', '0x4ae1', 'Dre', 'D', False), ('0x4aee', '0x4aee', 'BulCrypt', 'B1', False), ('0x5581', '0x5581', 'BulCrypt', 'B2', False)) self.ca_table = (('CryptoCaidSecaAvailable', 'S', False), ('CryptoCaidViaAvailable', 'V', False), ('CryptoCaidIrdetoAvailable', 'I', False), ('CryptoCaidNDSAvailable', 'Nd', False), ('CryptoCaidConaxAvailable', 'Co', False), ('CryptoCaidCryptoWAvailable', 'Cw', False), ('CryptoCaidPowerVUAvailable', 'P', False), ('CryptoCaidBetaAvailable', 'B', False), ('CryptoCaidNagraAvailable', 'N', False), ('CryptoCaidBissAvailable', 'Bi', False), ('CryptoCaidDreAvailable', 'D', False), ('CryptoCaidBulCrypt1Available', 'B1', False), ('CryptoCaidBulCrypt2Available', 'B2', False), ('CryptoCaidSecaSelected', 'S', True), ('CryptoCaidViaSelected', 'V', True), ('CryptoCaidIrdetoSelected', 'I', True), ('CryptoCaidNDSSelected', 'Nd', True), ('CryptoCaidConaxSelected', 'Co', True), ('CryptoCaidCryptoWSelected', 'Cw', True), ('CryptoCaidPowerVUSelected', 'P', True), ('CryptoCaidBetaSelected', 'B', True), ('CryptoCaidNagraSelected', 'N', True), ('CryptoCaidBissSelected', 'Bi', True), ('CryptoCaidDreSelected', 'D', True), ('CryptoCaidBulCrypt1Selected', 'B1', True), ('CryptoCaidBulCrypt2Selected', 'B2', True)) self.ecmdata = GetEcmInfo() self.feraw = self.fedata = self.updateFEdata = None return
def __init__(self, type, update_interval=1000): Poll.__init__(self) self.poll_interval = 1500 self.poll_enabled = True self.lanreceivetotal = 0 self.lanreceivetotalout = 0 self.lanreceive = 0 self.lanreceivemb = 0 self.wlanreceivetotal = 0 self.wlanreceivetotalout = 0 self.wlanreceive = 0 self.wlanreceivemb = 0 self.lantransmittotal = 0 self.lantransmittotalout = 0 self.lantransmit = 0 self.lantransmitmb = 0 self.wlantransmittotal = 0 self.wlantransmittotalout = 0 self.wlantransmit = 0 self.wlantransmitmb = 0 self.receivetotal = 0 self.receive = 0 self.transmittotal = 0 self.transmit = 0 self.receivemb = 0 self.nettyp = 'NONE' self.error_lanreceive = 0 self.drop_lanreceive = 0 self.error_lantransmite = 0 self.drop_lantransmite = 0 self.error_wlanreceive = 0 self.drop_wlanreceive = 0 self.error_wlantransmite = 0 self.drop_wlantransmite = 0 Converter.__init__(self, type) self.type = type self.type = type if type == 'RCL': self.type = self.RCL elif type == 'TML': self.type = self.TML elif type == 'RCW': self.type = self.RCW elif type == 'TMW': self.type = self.TMW elif type == 'RCLT': self.type = self.RCLT elif type == 'TMLT': self.type = self.TMLT elif type == 'RCWT': self.type = self.RCWT elif type == 'TMWT': self.type = self.TMWT elif type == 'RCL_MB': self.type = self.RCL_MB elif type == 'TML_MB': self.type = self.TML_MB elif type == 'RCW_MB': self.type = self.RCW_MB elif type == 'TMW_MB': self.type = self.TMW_MB elif type == 'RC': self.type = self.RC elif type == 'TM': self.type = self.TM elif type == 'RCT': self.type = self.RCT elif type == 'TMT': self.type = self.TMT elif type == 'RC_MB': self.type = self.RC_MB elif type == 'TM_MB': self.type = self.TM_MB elif type == 'NET_TYP': self.type = self.NET_TYP elif type == 'ERR_RCL': self.type = self.ERR_RCL elif type == 'ERR_TML': self.type = self.ERR_TML elif type == 'DRO_RCL': self.type = self.DRO_RCL elif type == 'DRO_TML': self.type = self.DRO_TML elif type == 'ERR_RCW': self.type = self.ERR_RCW elif type == 'ERR_TMW': self.type = self.ERR_TMW elif type == 'DRO_RCW': self.type = self.DRO_RCW elif type == 'DRO_TMW': self.type = self.DRO_TMW
def __init__(self, type): Poll.__init__(self) Converter.__init__(self, type) if type == "CAID": self.type = self.CAID elif type == "CAID2": self.type = self.CAID2 elif type == "PID": self.type = self.PID elif type == "ProvID": self.type = self.PROV elif type == "Delay": self.type = self.DELAY elif type == "Host": self.type = self.HOST elif type == "Net": self.type = self.IS_NET elif type == "Emu": self.type = self.IS_EMU elif type == "CryptInfo": self.type = self.CRYPT elif type == "CryptInfo2": self.type = self.CRYPT2 elif type == "SecaCrypt": self.type = self.SECA elif type == "SecaEcm": self.type = self.SECA_C elif type == "ViaCrypt": self.type = self.VIA elif type == "ViaEcm": self.type = self.VIA_C elif type == "IrdCrypt": self.type = self.IRD elif type == "IrdEcm": self.type = self.IRD_C elif type == "DigiCrypt": self.type = self.DIGI elif type == "DigiEcm": self.type = self.DIGI_C elif type == "NdsCrypt": self.type = self.NDS elif type == "NdsEcm": self.type = self.NDS_C elif type == "ConaxCrypt": self.type = self.CONAX elif type == "ConaxEcm": self.type = self.CONAX_C elif type == "CrwCrypt": self.type = self.CRW elif type == "CrwEcm": self.type = self.CRW_C elif type == "PwuCrypt": self.type = self.PWR elif type == "PwuEcm": self.type = self.PWR_C elif type == "TanCrypt": self.type = self.TAN elif type == "TanEcm": self.type = self.TAN_C elif type == "BetaCrypt": self.type = self.BETA elif type == "BetaEcm": self.type = self.BETA_C elif type == "NagraCrypt": self.type = self.NAGRA elif type == "NagraEcm": self.type = self.NAGRA_C elif type == "CodiCrypt": self.type = self.CODI elif type == "CodiEcm": self.type = self.CODI_C elif type == "BisCrypt": self.type = self.BISS elif type == "BisEcm": self.type = self.BISS_C elif type == "ExsCrypt": self.type = self.EXS elif type == "ExsEcm": self.type = self.EXS_C elif type == "AcrCrypt": self.type = self.ACR elif type == "AcrEcm": self.type = self.ACR_C elif type == "XcrCrypt": self.type = self.XCR elif type == "XcrEcm": self.type = self.XCR_C elif type == "OcrCrypt": self.type = self.OCR elif type == "OcrEcm": self.type = self.OCR_C elif type == "DreamCrypt": self.type = self.DRE elif type == "DreamEcm": self.type = self.DRE_C elif type == "GuardCrypt": self.type = self.GUARD elif type == "GuardEcm": self.type = self.GUARD_C elif type == "BulCrypt": self.type = self.BUL elif type == "BulEcm": self.type = self.BUL_C elif type == "PanaCrypt": self.type = self.PANA elif type == "PanaEcm": self.type = self.PANA_C elif type == "VrmCrypt": self.type = self.VRM elif type == "VrmEcm": self.type = self.VRM_C elif type == "RossCrypt": self.type = self.ROSS elif type == "RossEcm": self.type = self.ROSS_C elif type == "Crd": self.type = self.IS_CRD elif type == "CrdTxt": self.type = self.CRDTXT elif type == "IsFta": self.type = self.IS_FTA elif type == "IsCrypted": self.type = self.IS_CRYPTED elif type == "Short": self.type = self.SHORT elif type == "Default" or type == "" or type == None or type == "%": self.type = self.ALL else: self.type = self.FORMAT self.sfmt = type[:] # self.systemCaids = { # "01" : "Mediaguard", # "05" : "Viaccess", # "06" : "Irdeto", # "09" : "Videoguard", # "0B" : "Conax", # "0D" : "Cryptoworks", # "17" : "BetaCrypt", # "18" : "Nagravision"} self.systemTxtCaids_a = { "01" : "Mediaguard", "05" : "Viaccess", "06" : "Irdeto", "07" : "DigiCipher", "09" : "Videoguard", "0B" : "Conax", "0D" : "Cryptoworks", "0E" : "PowerVu", "10" : "Tandberg", "18" : "Nagravision", "22" : "CodiCrypt", "26" : "BiSS", "27" : "ExSet", "4B" : "Topvell", "54" : "Gospell", "55" : "BulCrypt", "56" : "Verimatrix", "7B" : "DRE-Crypt", "A1" : "RossCrypt"} self.systemTxtCaids_b = { "02" : "BetaCrypt", "22" : "BetaCrypt", "62" : "BetaCrypt", "20" : "AlphaCrypt", "BF" : "Skypilot", "D0" : "X-Crypt", "D1" : "X-Crypt", "D4" : "OmniCrypt", "E0" : "DRE-Crypt", "E1" : "DRE-Crypt", "60" : "SkyCrypt", "61" : "SkyCrypt", "63" : "SkyCrypt", "70" : "DreamCrypt", "EA" : "Cryptoguard", "EE" : "BulCrypt", "FC" : "Panaccess"}
def __init__(self, type): Poll.__init__(self) Converter.__init__(self, type) self.poll_interval = 5000 self.poll_enabled = True self.type, self.interesting_events = { "HasTelext": (self.HAS_TELETEXT, (iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "IsMultichannel": (self.IS_MULTICHANNEL, (iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "IsStereo": (self.IS_STEREO, (iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "IsCrypted": (self.IS_CRYPTED, (iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "IsWidescreen": (self.IS_WIDESCREEN, (iPlayableService.evVideoSizeChanged, iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "IsNotWidescreen": (self.IS_NOT_WIDESCREEN, (iPlayableService.evVideoSizeChanged, iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "SubservicesAvailable": (self.SUBSERVICES_AVAILABLE, (iPlayableService.evStart, )), "VideoWidth": (self.XRES, (iPlayableService.evVideoSizeChanged, )), "VideoHeight": (self.YRES, (iPlayableService.evVideoSizeChanged, )), "AudioPid": (self.APID, (iPlayableService.evUpdatedInfo, )), "VideoPid": (self.VPID, (iPlayableService.evUpdatedInfo, )), "PcrPid": (self.PCRPID, (iPlayableService.evUpdatedInfo, )), "PmtPid": (self.PMTPID, (iPlayableService.evUpdatedInfo, )), "TxtPid": (self.TXTPID, (iPlayableService.evUpdatedInfo, )), "TsId": (self.TSID, (iPlayableService.evUpdatedInfo, )), "OnId": (self.ONID, (iPlayableService.evUpdatedInfo, )), "Sid": (self.SID, (iPlayableService.evUpdatedInfo, )), "Framerate": (self.FRAMERATE, ( iPlayableService.evVideoFramerateChanged, iPlayableService.evUpdatedInfo, )), "Progressive": (self.PROGRESSIVE, ( iPlayableService.evVideoProgressiveChanged, iPlayableService.evUpdatedInfo, )), "VideoInfo": (self.VIDEO_INFO, ( iPlayableService.evVideoSizeChanged, iPlayableService.evVideoFramerateChanged, iPlayableService.evVideoProgressiveChanged, iPlayableService.evUpdatedInfo, )), "TransferBPS": (self.TRANSFERBPS, (iPlayableService.evUpdatedInfo, )), "HasHBBTV": (self.HAS_HBBTV, (iPlayableService.evUpdatedInfo, iPlayableService.evHBBTVInfo, iPlayableService.evStart)), "AudioTracksAvailable": (self.AUDIOTRACKS_AVAILABLE, (iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "SubtitlesAvailable": (self.SUBTITLES_AVAILABLE, (iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "Freq_Info": (self.FREQ_INFO, (iPlayableService.evUpdatedInfo, )), "Editmode": (self.EDITMODE, (iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "IsStream": (self.IS_STREAM, (iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "IsSD": (self.IS_SD, (iPlayableService.evVideoSizeChanged, iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "IsHD": (self.IS_HD, (iPlayableService.evVideoSizeChanged, iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "IsSDAndWidescreen": (self.IS_SD_AND_WIDESCREEN, (iPlayableService.evVideoSizeChanged, iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "IsSDAndNotWidescreen": (self.IS_SD_AND_NOT_WIDESCREEN, (iPlayableService.evVideoSizeChanged, iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "Is1080": (self.IS_1080, (iPlayableService.evVideoSizeChanged, iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "Is720": (self.IS_720, (iPlayableService.evVideoSizeChanged, iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "Is576": (self.IS_576, (iPlayableService.evVideoSizeChanged, iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "Is480": (self.IS_480, (iPlayableService.evVideoSizeChanged, iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "Is4K": (self.IS_4K, (iPlayableService.evVideoSizeChanged, iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "IsSDR": (self.IS_SDR, (iPlayableService.evVideoGammaChanged, iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "IsHDR": (self.IS_HDR, (iPlayableService.evVideoGammaChanged, iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "IsHDR10": (self.IS_HDR10, (iPlayableService.evVideoGammaChanged, iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "IsHLG": (self.IS_HLG, (iPlayableService.evVideoGammaChanged, iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "IsVideoMPEG2": (self.IS_VIDEO_MPEG2, (iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "IsVideoAVC": (self.IS_VIDEO_AVC, (iPlayableService.evUpdatedInfo, iPlayableService.evStart)), "IsVideoHEVC": (self.IS_VIDEO_HEVC, (iPlayableService.evUpdatedInfo, iPlayableService.evStart)), }[type]
def __init__(self, type): Poll.__init__(self) Converter.__init__(self, type) self.poll_interval = 1000 self.poll_enabled = True self.type = str(type)
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) if type == 'Auto': self.type = self.Auto elif type.startswith('Format:'): self.type = self.Format self.paramert_str = type elif type == 'Crypt': self.type = self.Crypt elif type == 'EMU': self.type = self.EMU elif type == 'NET': self.type = self.NET elif type == 'SCI': self.type = self.SCI elif type == 'FTA': self.type = self.FTA else: self.type = self.PreDefine self.poll_interval = 1000 self.poll_enabled = True self.TxtCaids = { "26": "BiSS", "01": "Seca-Mediaguard", "06": "Irdeto", "17": "BetaCrypt", "05": "Viacces", "18": "Nagravision", "09": "NDS-Videoguard", "0B": "Conax", "0D": "Cryptoworks", #"4A" : "DRECrypt", "27": "ExSet", "0E": "PowerVu", "22": "Codicrypt", "07": "DigiCipher", "55": "BulCrypt", "56": "Verimatrix", "7B": "DRECrypt", "A1": "Rosscrypt", "0E": "PowerVu" } self.txt_dre_caids = { 'E0': 'DRECrypt', 'E1': 'DRECrypt', 'EE': 'BulCrypt', 'D0': 'XCrypt', 'D1': 'XCrypt', '70': 'DreamCrypt', 'EA': 'CryptoGuard', '20': 'AlphaCrypt' } self.out_data = { 'caid': '', 'prov': '', 'time': '', 'using': '', 'protocol': '', 'reader': '', 'port': '', 'source': '', 'hops': '' } self.caid_data = self.ecm_time = self.prov_data = self.using_data = self.port_data = self.protocol_data = self.reader_data = self.hops_data = self.display_data = ''
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) self.poll_interval = 1000 self.poll_enabled = True
def __init__(self, type): Converter.__init__(self, type) self.type = type self.short_list = True Poll.__init__(self) self.poll_interval = 1000 self.poll_enabled = True self.list = [] if "FreqInfo" in type: self.type = self.FREQINFO elif "Orbital" in type: self.type = self.ORBITAL elif "ResCodec" in type: self.type = self.RESCODEC elif "VideoCodec" in type: self.type = self.VIDEOCODEC elif "Fps" in type: self.type = self.FPS elif "VideoSize" in type: self.type = self.VIDEOSIZE elif "PidInfo" in type: self.type = self.PIDINFO elif "PidHexInfo" in type: self.type = self.PIDHEXINFO elif "Is1080" in type: self.type = self.IS1080 elif "Is720" in type: self.type = self.IS720 elif "Is576" in type: self.type = self.IS576 elif "Is1440" in type: self.type = self.IS1440 elif "Is2160" in type: self.type = self.IS2160 elif "Is480" in type: self.type = self.IS480 elif "Is360" in type: self.type = self.IS360 elif "Is288" in type: self.type = self.IS288 elif "Is240" in type: self.type = self.IS240 elif "Is144" in type: self.type = self.IS144 elif "IsProgressive" in type: self.type = self.ISPROGRESSIVE elif "IsInterlaced" in type: self.type = self.ISINTERLACED elif "StreamUrl" in type: self.type = self.STREAMURL elif "StreamType" in type: self.type = self.STREAMTYPE elif "IsStreaming" in type: self.type = self.ISSTREAMING elif "HasMPEG2" in type: self.type = self.HASMPEG2 elif "HasAVC" in type: self.type = self.HASAVC elif "HasH263" in type: self.type = self.HASH263 elif "HasVC1" in type: self.type = self.HASVC1 elif "HasMPEG4VC" in type: self.type = self.HASMPEG4VC elif "HasHEVC" in type: self.type = self.HASHEVC elif "HasMPEG1" in type: self.type = self.HASMPEG1 elif "HasVP8" in type: self.type = self.HASVP8 elif "HasVP9" in type: self.type = self.HASVP9 elif "HasVP6" in type: self.type = self.HASVP6 elif "HasDIVX" in type: self.type = self.HASDIVX elif "HasXVID" in type: self.type = self.HASXVID elif "HasSPARK" in type: self.type = self.HASSPARK elif "HasAVS" in type: self.type = self.HASAVS elif "IsSDR" in type: self.type = self.ISSDR elif "IsHDR" in type: self.type = self.ISHDR elif "IsHDR10" in type: self.type = self.ISHDR10 elif "IsHLG" in type: self.type = self.ISHLG elif "HDRInfo" in type: self.type = self.HDRINFO
def __init__(self, type): Poll.__init__(self) Converter.__init__(self, type) if type == "CAID": self.type = self.CAID elif type == "PID": self.type = self.PID elif type == "ProvID": self.type = self.PROV elif type == "Delay": self.type = self.DELAY elif type == "Host": self.type = self.HOST elif type == "Net": self.type = self.IS_NET elif type == "Emu": self.type = self.IS_EMU elif type == "CryptInfo": self.type = self.CRYPT elif type == "CryptInfo2": self.type = self.CRYPT2 elif type == "BetaCrypt": self.type = self.BETA elif type == "ConaxCrypt": self.type = self.CONAX elif type == "CrwCrypt": self.type = self.CRW elif type == "DreamCrypt": self.type = self.DRE elif type == "ExsCrypt": self.type = self.EXS elif type == "IrdCrypt": self.type = self.IRD elif type == "NagraCrypt": self.type = self.NAGRA elif type == "NdsCrypt": self.type = self.NDS elif type == "SecaCrypt": self.type = self.SECA elif type == "ViaCrypt": self.type = self.VIA elif type == "BetaEcm": self.type = self.BETA_C elif type == "ConaxEcm": self.type = self.CONAX_C elif type == "CrwEcm": self.type = self.CRW_C elif type == "DreamEcm": self.type = self.DRE_C elif type == "ExsEcm": self.type = self.EXS_C elif type == "IrdEcm": self.type = self.IRD_C elif type == "NagraEcm": self.type = self.NAGRA_C elif type == "NdsEcm": self.type = self.NDS_C elif type == "SecaEcm": self.type = self.SECA_C elif type == "ViaEcm": self.type = self.VIA_C elif type == "BisCrypt": self.type = self.BISS elif type == "BisEcm": self.type = self.BISS_C elif type == "Crd": self.type = self.CRD elif type == "CrdTxt": self.type = self.CRDTXT elif type == "IsFta": self.type = self.IS_FTA elif type == "IsCrypted": self.type = self.IS_CRYPTED elif type == "Short": self.type = self.SHORT elif type == "Default" or type == "" or type == None or type == "%": self.type = self.ALL else: self.type = self.FORMAT self.sfmt = type[:] self.systemTxtCaids = { "26": "BiSS", "01": "Seca Mediaguard", "06": "Irdeto", "17": "BetaCrypt", "05": "Viacces", "18": "Nagravision", "09": "NDS-Videoguard", "0B": "Conax", "0D": "Cryptoworks", "4A": "DRE-Crypt", "27": "ExSet", "0E": "PowerVu", "22": "Codicrypt", "07": "DigiCipher", "56": "Verimatrix", "7B": "DRE-Crypt", "A1": "Rosscrypt" } self.systemCaids = { "26": "BiSS", "01": "SEC", "06": "IRD", "17": "BET", "05": "VIA", "18": "NAG", "09": "NDS", "0B": "CON", "0D": "CRW", "27": "EXS", "7B": "DRE", "4A": "DRE" }
def __init__(self, type, update_interval=1000): Poll.__init__(self) self.poll_interval = 1000 self.poll_enabled = True self.lanreceivetotal = 0 self.lanreceivetotalout = 0 self.lanreceive = 0 self.lanreceivemb = 0 self.wlanreceivetotal = 0 self.wlanreceivetotalout = 0 self.wlanreceive = 0 self.wlanreceivemb = 0 self.lantransmittotal = 0 self.lantransmittotalout = 0 self.lantransmit = 0 self.lantransmitmb = 0 self.wlantransmittotal = 0 self.wlantransmittotalout = 0 self.wlantransmit = 0 self.wlantransmitmb = 0 self.receivetotal = 0 self.receive = 0 self.transmittotal = 0 self.transmit = 0 self.receivemb = 0 self.nettyp = "NONE" self.error_lanreceive = 0 self.drop_lanreceive = 0 self.error_lantransmite = 0 self.drop_lantransmite = 0 self.error_wlanreceive = 0 self.drop_wlanreceive = 0 self.error_wlantransmite = 0 self.drop_wlantransmite = 0 Converter.__init__(self, type) self.type = type self.type = type if type == "RCL": self.type = self.RCL elif type == "TML": self.type = self.TML elif type == "RCW": self.type = self.RCW elif type == "TMW": self.type = self.TMW elif type == "RCLT": self.type = self.RCLT elif type == "TMLT": self.type = self.TMLT elif type == "RCWT": self.type = self.RCWT elif type == "TMWT": self.type = self.TMWT elif type == "RCL_MB": self.type = self.RCL_MB elif type == "TML_MB": self.type = self.TML_MB elif type == "RCW_MB": self.type = self.RCW_MB elif type == "TMW_MB": self.type = self.TMW_MB elif type == "RC": self.type = self.RC elif type == "TM": self.type = self.TM elif type == "RCT": self.type = self.RCT elif type == "TMT": self.type = self.TMT elif type == "RC_MB": self.type = self.RC_MB elif type == "TM_MB": self.type = self.TM_MB elif type == "NET_TYP": self.type = self.NET_TYP elif type == "ERR_RCL": self.type = self.ERR_RCL elif type == "ERR_TML": self.type = self.ERR_TML elif type == "DRO_RCL": self.type = self.DRO_RCL elif type == "DRO_TML": self.type = self.DRO_TML elif type == "ERR_RCW": self.type = self.ERR_RCW elif type == "ERR_TMW": self.type = self.ERR_TMW elif type == "DRO_RCW": self.type = self.DRO_RCW elif type == "DRO_TMW": self.type = self.DRO_TMW
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) self.type = self.NAME self.poll_interval = 30 * 1000 self.poll_enabled = True
def __init__(self, type): Poll.__init__(self) Converter.__init__(self, type) self.poll_interval = 100 self.poll_enabled = True self.type = str(type) self.path = "/usr/share/enigma2/Kraven-menu-icons/" self.userpath = "/usr/share/enigma2/Kraven-user-icons/" if fileExists( "/usr/share/enigma2/Kraven-menu-icons/kravenhd_logo.png"): self.logo = "/usr/share/enigma2/Kraven-menu-icons/kravenhd_logo.png" else: self.logo = "/usr/share/enigma2/KravenHD/logo.png" self.names = [ ("about_screen", "about.png"), #ATV ("about_screen", "info.png"), ("animation_setup", "usage_setup.png"), #ATV ("audio_menu", "audio.png"), #ATV ("audio_menu", "setup.png"), ("audio_setup", "audio.png"), #ATV ("audio_setup", "setup.png"), ("auto_scan", "tuner.png"), ("autolanguage_setup", "setup.png"), ("autores_setup", "service_info.png"), ("autoshutdown_setup", "shutdowntimer.png"), ("autotimer_setup", "autotimers.png"), #ATV ("av_setup", "movie_list.png"), ("blindscan", "tuner.png"), ("buttonsetup_setup", "buttonsetup.png"), #ATV ("buttonsetup_setup", "setup.png"), ("cablescan", "search.png"), #ATV ("cam_setup", "camd.png"), ("channelselection_setup", "setup.png"), ("ci_assign", "ci.png"), #ATV ("ci_assign", "setup.png"), ("ci_setup", "ci.png"), #ATV ("ci_setup", "setup.png"), ("crontimer_edit", "crontimers.png"), #ATV ("crontimer_edit", "timer.png"), ("deep_standby", "shutdown.png"), ("default_lists", "paket.png"), ("default_wizard", "paket.png"), ("device_manager", "hdd.png"), ("device_screen", "device.png"), #ATV ("device_screen", "hdd.png"), ("device_setup", "setup.png"), ("display_selection", "look.png"), ("display_setup", "look.png"), ("dns_setup", "net.png"), ("dreamplex", "plex.png"), #ATV ("dreamplex", "plugin.png"), ("dvd_player", "dvd.png"), #ATV ("dvdplayer", "dvd.png"), ("dvdplayer_setup", "dvd.png"), ("ecm_info", "tuner.png"), ("epg_menu", "movie_list.png"), ("epg_setup", "movie_list.png"), ("epgloadsave_menu", "epg_menu.png"), #ATV ("epgloadsave_menu", "movie_list.png"), ("epgrefresh", "refresh.png"), #ATV ("epgrefresh", "setup.png"), #ATV ("extended_selection", "setup.png"), ("factory_reset", "reset.png"), ("fansetup_config", "fan.png"), #ATV ("fansetup_config", "setup.png"), ("fastscan", "fast_scan.png"), #ATV ("fastscan", "tuner.png"), ("filecommand", "filecom.png"), ("googlemaps", "google.png"), ("harddisk_check", "hdd.png"), ("harddisk_convert", "hdd.png"), ("harddisk_init", "hdd.png"), ("harddisk_setup", "hdd.png"), ("hardisk_selection", "hdd.png"), ("hardreset", "restart.png"), ("hdmicec", "setup.png"), ("inadyn_setup", "Inadyn_setup.png"), #ATV ("inadyn_setup", "setup.png"), ("info_screen", "info.png"), ("infopanel", "info.png"), ("input_device_setup", "keyb.png"), ("ipbox_client_start", "streamconvert.png"), #ATV ("ipbox_client_start", "webb.png"), ("keyboard", "keyb.png"), ("keyboard_setup", "keyb.png"), ("language_setup", "webb.png"), ("lcd4linux", "lcd_skin_setup.png"), #ATV ("lcd4linux", "plugin.png"), ("lcd_setup", "setup.png"), ("lcd_skin_setup", "lcd4linux.png"), ("led_giga", "LED_giga.png"), #ATV ("led_giga", "setup.png"), ("ledmanager", "led.png"), #ATV ("ledmanager", "setup.png"), ("loadepgcache", "setup.png"), ("logs_setup", "setup.png"), ("manual_scan", "tuner.png"), ("media_player", "media.png"), #ATV ("mediaplayer", "media.png"), ("mediaportal", "plugin.png"), ("merlin_music_player", "music.png"), #ATV ("merlin_music_player", "plugin.png"), ("minidlna_setup", "setup.png"), ("movie_list", "movie.png"), ("moviebrowser", "service_info.png"), #ATV ("moviebrowser", "plugin.png"), ("multi_quick", "remotecontrol.png"), #ATV ("multi_quick", "mqb.png"), ("multi_quick", "keyb.png"), ("multi_quick", "plugin.png"), ("netafp_setup", "net.png"), ("netftp_setup", "net.png"), ("netmounts_setup", "net.png"), ("netnfs_setup", "net.png"), ("netrts_setup", "net.png"), ("netsabnzbd_setup", "net.png"), ("netsmba_setup", "net.png"), ("nettelnet_setup", "net.png"), ("netushare_setup", "net.png"), ("netvpn_setup", "net.png"), ("network_menu", "net.png"), ("network_setup", "net.png"), ("numzapext_setup", "setup.png"), ("openstore", "webb.png"), ("openwebif", "webif.png"), #ATV ("openwebif", "plugin.png"), ("osd3dsetup", "look.png"), ("osd_setup", "look.png"), ("osdsetup", "look.png"), ("osdsetup", "osdsetup.png"), #ATV ("parental_setup", "look.png"), ("parental_setup", "parental.png"), #ATV ("picturecenterfs", "plugin.png"), ("plugin_select", "pluginmanager.png"), #ATV ("plugin_select", "plugin.png"), ("plugin_selection", "pluginmanager.png"), #ATV ("plugin_selection", "plugin.png"), ("pluginhider_setup", "pluginhider.png"), #ATV ("pluginhider_setup", "plugin.png"), ("positioner_setup", "positioner_setup.png"), #ATV ("positioner_setup", "tuner.png"), ("powertimer_edit", "powertimers.png"), #ATV ("powertimer_edit", "shutdowntimer.png"), ("powertimer_edit", "timer.png"), ("pvmc_mainmenu", "pvmc.png"), #ATV ("pvmc_mainmenu", "plugin.png"), ("rcu select", "remotecontrol.png"), #ATV ("rcu select", "setup.png"), ("rec_setup", "recording_setup.png"), #ATV ("rec_setup", "setup.png"), ("recording_setup", "setup.png"), ("recordpaths", "hdd.png"), ("remote_setup", "setup.png"), ("remotecode", "setup.png"), ("remotecontrolcode", "remotecontrol.png"), #ATV ("remotecontrolcode", "setup.png"), ("rfmod_setup", "setup.png"), ("run_kodi", "menu_kodi.png"), #ATV ("run_kodi", "plugin.png"), ("sat_ip_client", "satip.png"), #ATV ("sat_ip_client", "net.png"), ("satfinder", "satfinder.png"), #ATV ("satfinder", "tuner.png"), ("saveepgcache", "saveepgcache.png"), #ATV ("saveepgcache", "movie_list.png"), ("scart_switch", "scart.png"), #ATV ("scart_switch", "setup.png"), ("select_menu", "movie.png"), ("select_menu", "plugin.png"), ("service_info_screen", "info.png"), #ATV ("service_info_screen", "service_info.png"), ("service_searching_selection", "tuner.png"), ("setup_epgenhanced", "setup.png"), ("setup_epggraphical", "setup.png"), ("setup_epginfobar", "setup.png"), ("setup_epginfobargraphical", "setup.png"), ("setup_epgmulti", "setup.png"), ("setup_selection", "setup.png"), ("sibsetup", "plugin.png"), ("skin_setup", "setup.png"), ("sleep", "shutdowntimer.png"), ("software_manager", "setup.png"), ("specialfeatures_menu", "setup.png"), ("sportspub_plugin", "plugin.png"), ("standby", "power.png"), ("standby_restart_list", "shutdown.png"), ("start_kodi", "menu_kodi.png"), #ATV ("start_kodi", "plugin.png"), #ATV ("startwizzard", "paket.png"), ("streamconvert", "webb.png"), ("subtitle_selection", "sub.png"), ("subtitle_setup", "sub.png"), ("sundtek_control_enter", "plugin.png"), ("supportchannel_ytchannel", "supportchannel.png"), #ATV ("supportchannel_ytchannel", "plugin.png"), ("system_selection", "setup.png"), ("tempfancontrol", "fan.png"), #ATV ("tempfancontrol", "setup.png"), ("time_setup", "timer.png"), ("timer_edit", "timers.png"), #ATV ("timer_edit", "timer.png"), ("timer_menu", "timer.png"), ("timezone_setup", "timezone.png"), #ATV ("timezone_setup", "webb.png"), ("timshift_setup", "movie_list.png"), ("timshift_setup", "timshift_setup.png"), #ATV ("tuner_setup", "setup.png"), ("usage_setup", "setup.png"), ("user_interface", "setup.png"), ("vfd_ew", "VFD_INI.png"), #ATV ("vfd_ew", "setup.png"), ("vfd_ini", "VFD_INI.png"), #ATV ("vfd_ini", "setup.png"), ("video_clipping", "service_info.png"), #ATV ("video_clipping", "movie_list.png"), ("video_finetune", "videofinetune_setup.png"), #ATV ("video_finetune", "movie_list.png"), ("video_menu", "service_info.png"), #ATV ("video_menu", "movie_list.png"), ("video_setup", "service_info.png"), #ATV ("video_setup", "movie_list.png"), ("videoenhancement_setup", "movie_list.png"), ("vmc_init_setup", "vmc_setup.png"), #ATV ("vmc_init_setup", "setup.png"), ("vmc_init_startvmc", "vmc.png"), #ATV ("vmc_init_startvmc", "plugin.png"), ("volume_adjust", "AutomaticVolumeAdjustment.png"), #ATV ("volume_adjust", "setup.png"), ("vps", "streamconvert.png"), #ATV ("vps", "movie_list.png"), ("vti_epg_panel", "epg_setup.png"), #ATV ("vti_epg_panel", "paket.png"), ("vti_menu", "vtimenu.png"), ("vti_menu", "setup.png"), #ATV ("vti_movies", "movie_list.png"), ("vti_movies", "movie.png"), #ATV ("vti_panel", "vtimenu.png"), ("vti_panel_news", "info.png"), #ATV ("vti_servicelist", "service_info.png"), ("vti_servicelist", "info.png"), #ATV ("vti_panel_news", "webb.png"), ("vti_subtitles", "sub.png"), ("vti_system_setup", "setup.png"), ("vti_timer", "timer.png"), ("vti_tv_radio", "movie_list.png"), ("vti_tv_radio", "movie.png"), #ATV ("vti_user_interface", "user_interface.png"), #ATV ("vti_user_interface", "camd.png"), ("webradiofs", "webradioFS.png"), #ATV ("webradiofs", "plugin.png"), ("xbmc_starten", "plugin.png"), ("yamp", "plugin.png"), ("yamp_music_player", "plugin.png"), ("youtube_tv", "youtube.png"), #ATV ("youtube_tv", "plugin.png") ]
def __init__(self, type): Converter.__init__(self, type) Poll.__init__(self) if type == "Vfd": self.type = self.VFD elif type == "Date": self.type = self.DATE elif type == "Shortdate": self.type = self.SHORTDATE elif type == "Day": self.type = self.DAY elif type == "Julianday": self.type = self.JDAY elif type == "Shortday": self.type = self.SHORTDAY elif type == "Location": self.type = self.LOCATION elif type == "Timezone": self.type = self.TIMEZONE elif type == "Latitude": self.type = self.LATITUDE elif type == "Longitude": self.type = self.LONGITUDE elif type == "Sunrise": self.type = self.SUNRISE elif type == "Sunset": self.type = self.SUNSET elif type == "Solstice": self.type = self.SOLSTICE elif type == "Moonrise": self.type = self.MOONRISE elif type == "Moonset": self.type = self.MOONSET elif type == "Moondist": self.type = self.MOONDIST elif type == "Moonphase": self.type = self.MOONPHASE elif type == "Moonlight": self.type = self.MOONLIGHT elif type == "PiconMoon": self.type = self.MOONPICON elif type == "Temp": self.type = self.TEMP elif type == "Picon": self.type = self.PICON elif type == "Skytext": self.type = self.SKYTEXT elif type == "Feelslike": self.type = self.FEELSLIKE elif type == "Humidity": self.type = self.HUMIDITY elif type == "Wind": self.type = self.WIND elif type == "Windspeed": self.type = self.WINDSPEED # День 0 elif type == "Date0": self.type = self.DATE0 elif type == "Shortdate0": self.type = self.SHORTDATE0 elif type == "Day0": self.type = self.DAY0 elif type == "Shortday0": self.type = self.SHORTDAY0 elif type == "Temp0": self.type = self.TEMP0 elif type == "Lowtemp0": self.type = self.LOWTEMP0 elif type == "Hightemp0": self.type = self.HIGHTEMP0 elif type == "Picon0": self.type = self.PICON0 elif type == "Skytext0": self.type = self.SKYTEXT0 elif type == "Precip0": self.type = self.PRECIP0 # День 1 elif type == "Date1": self.type = self.DATE1 elif type == "Shortdate1": self.type = self.SHORTDATE1 elif type == "Day1": self.type = self.DAY1 elif type == "Shortday1": self.type = self.SHORTDAY1 elif type == "Temp1": self.type = self.TEMP1 elif type == "Lowtemp1": self.type = self.LOWTEMP1 elif type == "Hightemp1": self.type = self.HIGHTEMP1 elif type == "Picon1": self.type = self.PICON1 elif type == "Skytext1": self.type = self.SKYTEXT1 elif type == "Precip1": self.type = self.PRECIP1 # День 2 elif type == "Date2": self.type = self.DATE2 elif type == "Shortdate2": self.type = self.SHORTDATE2 elif type == "Day2": self.type = self.DAY2 elif type == "Shortday2": self.type = self.SHORTDAY2 elif type == "Temp2": self.type = self.TEMP2 elif type == "Lowtemp2": self.type = self.LOWTEMP2 elif type == "Hightemp2": self.type = self.HIGHTEMP2 elif type == "Picon2": self.type = self.PICON2 elif type == "Skytext2": self.type = self.SKYTEXT2 elif type == "Precip2": self.type = self.PRECIP2 # День 3 elif type == "Date3": self.type = self.DATE3 elif type == "Shortdate3": self.type = self.SHORTDATE3 elif type == "Day3": self.type = self.DAY3 elif type == "Shortday3": self.type = self.SHORTDAY3 elif type == "Temp3": self.type = self.TEMP3 elif type == "Lowtemp3": self.type = self.LOWTEMP3 elif type == "Hightemp3": self.type = self.HIGHTEMP3 elif type == "Picon3": self.type = self.PICON3 elif type == "Skytext3": self.type = self.SKYTEXT3 elif type == "Precip3": self.type = self.PRECIP3 # День 4 elif type == "Date4": self.type = self.DATE4 elif type == "Shortdate4": self.type = self.SHORTDATE4 elif type == "Day4": self.type = self.DAY4 elif type == "Shortday4": self.type = self.SHORTDAY4 elif type == "Temp4": self.type = self.TEMP4 elif type == "Lowtemp4": self.type = self.LOWTEMP4 elif type == "Hightemp4": self.type = self.HIGHTEMP4 elif type == "Picon4": self.type = self.PICON4 elif type == "Skytext4": self.type = self.SKYTEXT4 elif type == "Precip4": self.type = self.PRECIP4 self.iConsole = iConsole() self.poll_interval = time_update_ms self.poll_enabled = True
def situation_vote(self): language = self.group_data["lang"] poll = None text = "" with codecs.open(os.path.join("Lang", language, "LeftAnnounce"), 'r', encoding='utf8') as file: text = file.read() text = text.replace('*', str(self.situation_announce), 1) self.context.bot.send_message(chat_id=self.group_chat_id, text=text) if language == 'en': poll = Poll( "Vote to announce situation: " + " \nVoters:" + "🙋♂️", ["YES", "NO"], self.group_chat_id, "day") text = "Voting results to announce: \n\nYes: " else: poll = Poll( "رای برای اعلام وضعیت: " + " \n" + "🙋♂️" + "رای دهندگان:", ["آره", "نه"], self.group_chat_id, "day") text = "نتیجه ی رای گیری برای اعلام وضعیت : \n\nآره: " poll_message = poll.send_poll(self.context) with codecs.open(os.path.join("Lang", language, "VoteTime"), 'r', encoding='utf8') as file: time_message = self.context.bot.send_message( chat_id=self.group_chat_id, text=file.read()) time.sleep(15) for user_id, status in self.voters.items(): if status == "YES": self.situation_announce_votes.append(user_id) p = self.get_player_by_id(user_id) text += " \n" + p.get_markdown_call() if language == 'en': text += " \n\nNo:" else: text += " \n\nنه:" for user_id, status in self.voters.items(): if status == "NO": p = self.get_player_by_id(user_id) text += " \n" + p.get_markdown_call() poll_message.edit_text(text=text, parse_mode="Markdown") time_message.delete() self.voters = {} if len(self.situation_announce_votes) > len( self.get_alive_players()) // 2: self.situation_announce = self.situation_announce - 1 all_player = len(self.get_alive_players()) city = len(self.get_citizens()) mafia = all_player - city text = "" with codecs.open(os.path.join("Lang", language, "AnnounceSituation"), 'r', encoding='utf8') as file: text = file.read() text = text.replace('*', str(mafia), 1) text = text.replace('*', str(city), 1) self.context.bot.send_message(chat_id=self.group_chat_id, text=text) if self.situation_announce == 0: with codecs.open(os.path.join("Lang", language, "LastAnnounce"), 'r', encoding='utf8') as file: self.context.bot.send_message(chat_id=self.group_chat_id, text=file.read()) else: with codecs.open(os.path.join("Lang", language, "LeftAnnounce"), 'r', encoding='utf8') as file: text = file.read() text = text.replace('*', str(self.situation_announce), 1) self.context.bot.send_message(chat_id=self.group_chat_id, text=text) else: with codecs.open(os.path.join("Lang", language, "AnnounceDidntAccept"), 'r', encoding='utf8') as file: self.context.bot.send_message(chat_id=self.group_chat_id, text=file.read())