still copy split video thumbnails

This commit is contained in:
jbannon 2022-07-18 05:19:07 +00:00
parent 060985433c
commit 1a73854e1e
2 changed files with 13 additions and 1 deletions

View file

@ -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}",
)

View file

@ -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]):
"""