From 6ad6d4ddbf01593453c12b39773c07cd028bd261 Mon Sep 17 00:00:00 2001 From: eversio Date: Wed, 2 Oct 2024 01:52:19 +1000 Subject: [PATCH] fix: support files in rclone root Files can sometimes be sitting in the root of the webdav mount. This fix updates the symlinker to find those files. --- src/program/symlink.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/program/symlink.py b/src/program/symlink.py index 7228b1de..9b9a6959 100644 --- a/src/program/symlink.py +++ b/src/program/symlink.py @@ -354,4 +354,9 @@ def get_item_path(item: Union[Movie, Episode]) -> Optional[Path]: file_path = rclone_path / folder / item.file if file_path.exists(): return file_path + + # Not in a folder? Perhaps it's just sitting in the root. + file = rclone_path / item.file + if file.exists() and file.is_file(): + return file return None \ No newline at end of file