diff --git a/backend/src/media_library_viewer_api/dependencies.py b/backend/src/media_library_viewer_api/dependencies.py index 2c5fc12..bac7543 100644 --- a/backend/src/media_library_viewer_api/dependencies.py +++ b/backend/src/media_library_viewer_api/dependencies.py @@ -58,10 +58,10 @@ def _jellyseerr_client_for(cache_key: tuple[str, str]) -> JellyseerrClient | Non @lru_cache(maxsize=32) -def _ssh_client_for(cache_key: tuple[str, str, str, int, str, str | None, str | None, str | None]) -> RemoteSSHClient: - machine_id, host, username, port, key_filename, password, private_key, known_hosts_path = cache_key +def _ssh_client_for(cache_key: tuple[str, str, str, int, str, str | None, str | None, str | None, str | None]) -> RemoteSSHClient: + machine_id, host, username, port, key_filename, password, private_key, private_key_passphrase, known_hosts_path = cache_key logger.info( - "Creating SSH client machine_id=%s host=%s user=%s port=%s key=%s password=%s private_key=%s", + "Creating SSH client machine_id=%s host=%s user=%s port=%s key=%s password=%s private_key=%s passphrase=%s", machine_id or "", host or "", username or "", @@ -69,6 +69,7 @@ def _ssh_client_for(cache_key: tuple[str, str, str, int, str, str | None, str | key_filename or "", "set" if password else "missing", "set" if private_key else "missing", + "set" if private_key_passphrase else "missing", ) client = RemoteSSHClient( host=host, @@ -76,6 +77,7 @@ def _ssh_client_for(cache_key: tuple[str, str, str, int, str, str | None, str | port=port, key_filename=key_filename or None, private_key=private_key or None, + private_key_passphrase=private_key_passphrase or None, password=password or None, known_hosts_path=known_hosts_path or None, ) diff --git a/docs/REQUIREMENTS.md b/docs/REQUIREMENTS.md index 8a27e20..522a62c 100644 --- a/docs/REQUIREMENTS.md +++ b/docs/REQUIREMENTS.md @@ -253,6 +253,7 @@ Phase 1: Jellyfin media index, SSH-based remote filesystem inspection, server mo - 2026-05-07: SSH key records should persist and display the derived public key and fingerprint, not just the private key blob, so imports and generated keys are auditable without recomputation. - 2026-05-07: SSH machine creation/editing should present a saved-key dropdown and warn when no SSH keys exist yet, instead of forcing manual key-id entry. - 2026-05-07: Saved task runs should return structured failure output for local execution problems instead of surfacing a generic 500 error. +- 2026-05-07: SSH dependency resolution should keep its cached tuple shape aligned with the legacy and machine-specific SSH settings so SSH clients can be created without tuple-unpack crashes. - 2026-05-07: Machine creation was adjusted so dialog edits are controlled by the parent form state, ensuring all entered fields are actually saved. - 2026-05-07: Local machines now work through the same Files/Jobs/monitoring tool paths without SSH credentials, and creating a machine starts the monitoring worker automatically. - 2026-05-06: Closing an edited Action popup now warns before discarding unsaved changes.