diff --git a/src/ytdl_sub/downloaders/youtube/split_video.py b/src/ytdl_sub/downloaders/youtube/split_video.py index 795aa9c0..5a2e545d 100644 --- a/src/ytdl_sub/downloaders/youtube/split_video.py +++ b/src/ytdl_sub/downloaders/youtube/split_video.py @@ -183,7 +183,7 @@ class YoutubeSplitVideoDownloader( # Copy the original vid thumbnail to the working directory with the new uid. This so # downstream logic thinks this split video has its own thumbnail - FileHandler.move( + FileHandler.copy( src_file_path=entry.get_download_thumbnail_path(), dst_file_path=Path(self.working_directory) / f"{new_uid}.{entry.thumbnail_ext}", ) diff --git a/src/ytdl_sub/utils/file_handler.py b/src/ytdl_sub/utils/file_handler.py index 9bc0b1df..3d9f55f1 100644 --- a/src/ytdl_sub/utils/file_handler.py +++ b/src/ytdl_sub/utils/file_handler.py @@ -176,6 +176,18 @@ class FileHandler: """ return self._file_handler_transaction_log + @classmethod + def copy(cls, src_file_path: Union[str, Path], dst_file_path: Union[str, Path]): + """ + Parameters + ---------- + src_file_path + Source file + dst_file_path + Destination file + """ + shutil.copyfile(src=src_file_path, dst=dst_file_path) + @classmethod def move(cls, src_file_path: Union[str, Path], dst_file_path: Union[str, Path]): """