diff --git a/osxphotos/cli/import_cli.py b/osxphotos/cli/import_cli.py index a93956478..5754fb664 100644 --- a/osxphotos/cli/import_cli.py +++ b/osxphotos/cli/import_cli.py @@ -2823,7 +2823,7 @@ def sort_paths(paths: Iterable[pathlib.Path]) -> tuple[pathlib.Path, ...]: def path_key(path: pathlib.Path) -> tuple[str, int, int, int, int]: extension = path.suffix.lower() is_aae = extension == ".aae" - is_mov = extension == ".mov" + is_mov = extension in (".mov", ".mp4") base_name = path.stem.split("_")[0] # Extract the base name without suffixes return (base_name, len(path.stem), is_aae, is_mov) diff --git a/osxphotos/image_file_utils.py b/osxphotos/image_file_utils.py index 20710c8f0..0d69313ab 100644 --- a/osxphotos/image_file_utils.py +++ b/osxphotos/image_file_utils.py @@ -84,9 +84,10 @@ def is_live_pair(filepath1: str | os.PathLike, filepath2: str | os.PathLike) -> def is_possible_live_pair( filepath1: str | os.PathLike, filepath2: str | os.PathLike ) -> bool: - """Return True if photos could be a live photo pair (even if files lack the Content ID metadata""" - print(f"{filepath1=}, {filepath2=}") - if is_image_file(filepath1) and is_video_file(filepath2): + """Return True if photos could be a live photo pair (even if files lack the Content ID metadata)""" + if (is_image_file(filepath1) and is_video_file(filepath2)) or ( + is_video_file(filepath1) and is_image_file(filepath2) + ): return True return False