def turn_page(self): """ Turn author books page """ p = self.current_page np = self.parser.news_parser url = self.author_url + np.page_url_prefix + str(p) in_cache = self.parser.news_parser.is_in_cache(url) if not in_cache: self.set_loading(self.author_name) BookScreen.turn_page(self) if not in_cache: self.reset_loading()
def __init__(self, util, listeners, title, go_site_playback, author_url, site_parser, voice_assistant, d): """ Initializer :param util: utility object :param listeners: screen listeners :param title: screen title :param go_site_playback: playback callback :param author_url: url :param site_parser: site parser :param d: dictionary with menu button flags """ self.author_name = title self.author_url = author_url self.parser = site_parser BookScreen.__init__(self, util, listeners, title, AUTHOR_BOOKS, go_site_playback, self.get_books, site_parser, voice_assistant, d)
def __init__(self, util, listeners, go_site_playback, site_parser, voice_assistant, d): """ Initializer :param util: utility object :param listeners: screen listeners :param go_site_playback: playback callback :param site_parser: site parser :param d: dictionary with menu button flags """ title = util.config[LABELS][KEY_NEW_BOOKS] self.language_url = d[4] BookScreen.__init__(self, util, listeners, title, NEW_BOOKS, go_site_playback, self.get_books, site_parser, voice_assistant, d)
def __init__(self, util, listeners, title, go_site_playback, genre, site_parser, voice_assistant, d): """ Initializer :param util: utility object :param listeners: screen listeners :param title: screen title :param go_site_playback: playback callback :param genre: genre :param site_parser: site parser :param d: dictionary with menu button flags """ self.current_genre = genre self.parser = site_parser self.title = title self.language_url = d[4] BookScreen.__init__(self, util, listeners, title, GENRE_BOOKS, go_site_playback, self.get_books, site_parser, voice_assistant, d)