fix: treat missing recorder ready directory as empty

This commit is contained in:
LengedZhao
2026-08-10 15:56:36 +08:00
parent 6caad268b8
commit 5851c26d43

View File

@@ -183,7 +183,9 @@ class DataGetSync:
def list_remote_episodes(self) -> list[str]:
root = shlex.quote(self.remote_ready)
output = self._remote_command(
f"find {root} -mindepth 1 -maxdepth 1 -type d -printf '%f\\n'"
f"if test -d {root}; then "
f"find {root} -mindepth 1 -maxdepth 1 -type d -printf '%f\\n'; "
"fi"
)
names = sorted({line.strip() for line in output.splitlines() if line.strip()})
unsafe = [name for name in names if not safe_episode_name(name)]