def guida_tv_canale_settimana(self, cid, dt): dt = staticutils.get_date_from_timestamp(dt) for d in range(0, 16): currdate = dt - timedelta(days=d) kodiutils.addListItem(kodiutils.getFormattedDate(currdate), {'mode': 'guida_tv', 'id': cid, 'day': staticutils.get_timestamp_midnight(currdate)}) # kodiutils.addListItem(kodiutils.LANGUAGE(32136), # {'mode': 'guida_tv', 'id': cid, # 'week': staticutils.get_timestamp_midnight(dt - timedelta(days=7))}) kodiutils.endScript()
def guida_tv_root(self): kodiutils.setContent('videos') els = self.med.OttieniCanaliLive(sort='ShortTitle', range=self.__imposta_range()) for prog in els: infos = _gather_info(prog) arts = _gather_art(prog) if 'tuningInstruction' in prog: if prog['tuningInstruction'] and not prog['mediasetstation$eventBased']: kodiutils.addListItem(prog["title"], {'mode': 'guida_tv', 'id': prog['callSign'], 'week': staticutils.get_timestamp_midnight()}, videoInfo=infos, arts=arts) kodiutils.endScript()