def __init_components(self): self.titlebar = Titlebar() self.sleep_timer = SleepTimer() self.speed = PlaybackSpeed() player.init() self.titlebar.activate() if player.get_current_track() is None: self.block_ui_buttons(True) self._importer.add_listener(self._on_importer_event)
def __init__(self): super().__init__() self._gst_player: player = player.get_playbin() player.add_player_listener(self._pass_legacy_player_events) self.play_status_updater: IntervalTimer = IntervalTimer( 1, self._emit_tick) self._fadeout_thread: Optional[Thread] = None player.init() last_book = self._library.last_played_book if last_book: last_book.last_played = int(time.time()) player.load_file(last_book.current_chapter._db_object) self._rewind_feature()
def __init_components(self): self.titlebar = Titlebar() self.sleep_timer = SleepTimer() self.speed = PlaybackSpeed() self.settings = Settings() self.book_overview = BookOverview() self.fs_monitor = fs_monitor.FilesystemMonitor() self.offline_cache = offline_cache.OfflineCache() player.init() self.titlebar.activate() if player.get_current_track() is None: self.block_ui_buttons(True)