def list(self, url): param = get_params(url) menu = param.get('menu') genre = param.get('genre') letter = param.get('letter') date = param.get('date') channel = param.get('channel') related = param.get('related') episodes = param.get('episodes') bonuses = param.get('bonuses') page = param.get('page', 1) if genre: for g in ivysilani.genres(): if g.link == genre: return self.listProgrammelist(g, episodes=True) elif letter: letter = urllib.unquote_plus(letter) for l in ivysilani.alphabet(): if _toString(l.link) == _toString(letter): return self.listProgrammelist(l, episodes=True) elif date and channel: return self.listProgrammelist( ivysilani.Date(date, self.selectLiveChannel(channel))) else: if date: return self.listChannelsForDate(date) elif related: return self.listContext("related", related, page) elif episodes: return self.listContext("episodes", episodes, page) elif bonuses: return self.listContext("bonuses", bonuses, page) elif menu: if menu == "live": return self.listLiveChannels() elif menu == "byDate": return self.listDates() elif menu == "byLetter": return self.listAlphabet() elif menu == "byGenre": return self.listGenres() else: for spotlight in ivysilani.SPOTLIGHTS: if spotlight.ID == menu: return self.listProgrammelist(spotlight)
playable = ivysilani.Programme(play) playPlayable(playable, skip_auto, force_quality) elif genre: for g in ivysilani.genres(): if g.link == genre: listProgrammelist(g, episodes=True) _setViewMode("Media info") break elif letter: for l in ivysilani.alphabet(): if _toString(l.link) == _toString(letter): listProgrammelist(l, episodes=True) _setViewMode("Media info") break elif date and channel: listProgrammelist(ivysilani.Date(date, selectLiveChannel(channel))) _setViewMode("Media info") else: if date: listChannelsForDate(date) _setViewMode('Media info 2') elif related: listContext("related", related, page) _setViewMode("Media info") elif episodes: listContext("episodes", episodes, page) _setViewMode("Media info") elif bonuses: listContext("bonuses", bonuses, page) _setViewMode("Media info") elif menu: