def _remove_popup(self): if not self._has_popup(): return with self.popup: self.popup.close() utils.clear_property('service.upnext.dialog') del self.popup self.popup = None
def extract_play_info(self, next_up_page, showing_next_up_page, showing_still_watching_page, still_watching_page): if showing_next_up_page: next_up_page.close() should_play_default = not next_up_page.is_cancel() should_play_non_default = next_up_page.is_watch_now() elif showing_still_watching_page: still_watching_page.close() should_play_default = still_watching_page.is_still_watching() should_play_non_default = still_watching_page.is_still_watching() else: # FIXME: This is a workaround until we handle this better (see comments in #142) return False, False if next_up_page.is_watch_now( ) or still_watching_page.is_still_watching(): self.state.played_in_a_row = 1 else: self.state.played_in_a_row += 1 clear_property('service.upnext.dialog') return should_play_default, should_play_non_default