Skip to content

Commit

Permalink
added additional logging for files already compressed or unable to co…
Browse files Browse the repository at this point in the history
…mpress previously
  • Loading branch information
szmania committed Dec 6, 2023
1 parent ac0f0a1 commit f1b712d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion megamanager/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.1"
__version__ = "0.2.2"
4 changes: 4 additions & 0 deletions megamanager/mega_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ def _compress_image_files(self, local_root):
if (file_md5_hash not in self.__compressed_image_files) \
and (file_md5_hash not in self.__unable_to_compress_image_files):
self._compress_image_file(file_path=local_file_path)
else:
logger.debug(' Image file already compressed or previously unable to compress: "{}"'.format(local_file_path))

else:
raise PathMappingDoesNotExist(' Path mapping does not exist: {}'.format(local_root))
Expand Down Expand Up @@ -301,6 +303,8 @@ def _compress_video_files(self, local_root):
if (file_md5_hash not in self.__compressed_video_files) \
and (file_md5_hash not in self.__unable_to_compress_video_files):
self._compress_video_file(file_path=local_file_path)
else:
logger.debug(' Video file already compressed or previously unable to compress: "{}"'.format(local_file_path))
else:
logger.warning(' No files found in path: "{}"'.format(local_root))

Expand Down

0 comments on commit f1b712d

Please sign in to comment.