def test_main(self): old_argv = sys.argv try: util.set_win32_unicode_argv() if os.name == "nt": self.assertTrue(isinstance(sys.argv[0], text_type)) finally: sys.argv = old_argv
def test_main(self): old_argv = sys.argv try: util.set_win32_unicode_argv() if os.name == "nt": self.assertTrue(isinstance(sys.argv[0], text_type)) finally: sys.argv = old_argv
app.player.setup(PlaylistModel(), None, 0) pm = quodlibet.init_plugins() pm.rescan() from quodlibet.qltk.exfalsowindow import ExFalsoWindow dir_ = args[0] if os.name == "nt": dir_ = fsdecode(dir_) app.window = ExFalsoWindow(app.library, dir_) app.window.init_plugins() from quodlibet.util.cover import CoverManager app.cover_manager = CoverManager() app.cover_manager.init_plugins() from quodlibet.qltk import session session.init("exfalso") quodlibet.enable_periodic_save(save_library=False) quodlibet.main(app.window) quodlibet.finish_first_session(app.id) config.save(const.CONFIG) print_d("Finished shutdown.") if __name__ == "__main__": set_win32_unicode_argv() main()
priority=GLib.PRIORITY_HIGH) def before_quit(): print_d("Saving active browser state") try: app.browser.save() except NotImplementedError: pass print_d("Shutting down player device %r." % player.version_info) player.destroy() quodlibet.main(window, before_quit=before_quit) quodlibet.finish_first_session(app.id) mmkeys_handler.quit() remote.stop() fsiface.destroy() tracker.destroy() quodlibet.library.save() config.save(const.CONFIG) print_d("Finished shutdown.") if __name__ == "__main__": set_win32_unicode_argv() main()