Example #1
0
    def login_manual(self, server, user=None):
        # Return manual login user authenticated or raise error
        dialog = LoginManual("script-emby-connect-login-manual.xml", *XML_PATH)
        dialog.set_server(server)
        dialog.set_user(user)
        dialog.doModal()

        if dialog.is_logged_in():
            user = dialog.get_user()
            self._connect.onAuthenticated(user)
            return user
        else:
            raise RuntimeError("User is not authenticated")
    def login_manual(self, server, user=None):
        # Return manual login user authenticated or raise error
        dialog = LoginManual("script-emby-connect-login-manual.xml", *XML_PATH)
        dialog.set_server(server)
        dialog.set_user(user)
        dialog.doModal()

        if dialog.is_logged_in():
            user = dialog.get_user()
            self._connect.onAuthenticated(user)
            return user
        else:
            raise RuntimeError("User is not authenticated")
Example #3
0
    def login_manual(self, user=None, manager=None):

        ''' Return manual login user authenticated or raise error.
        '''
        dialog = LoginManual("script-jellyfin-connect-login-manual.xml", *XML_PATH)
        dialog.set_args(**{'connect_manager': manager or self.connect_manager, 'username': user or {}})
        dialog.doModal()

        if dialog.is_logged_in():
            return dialog.get_user()
        else:
            raise RuntimeError("User is not authenticated")