def manual_server(self): # Return server or raise error dialog = ServerManual("script-emby-connect-server-manual.xml", *XML_PATH) dialog.set_connect_manager(self._connect) dialog.doModal() if dialog.is_connected(): return dialog.get_server() else: raise RuntimeError("Server is not connected")
def manual_server(self, manager=None): ''' Return server or raise error. ''' dialog = ServerManual("script-jellyfin-connect-server-manual.xml", *XML_PATH) dialog.set_args(**{'connect_manager': manager or self.connect_manager}) dialog.doModal() if dialog.is_connected(): return dialog.get_server() else: raise RuntimeError("Server is not connected")