diff --git a/packaging/batch-media-compressor.spec b/packaging/batch-media-compressor.spec index 7d0c49f..637c7ef 100644 --- a/packaging/batch-media-compressor.spec +++ b/packaging/batch-media-compressor.spec @@ -39,8 +39,8 @@ app = BUNDLE(exe, info_plist={ 'LSUIElement': True, 'CFBundleDisplayName': 'Batch Media Compressor', - 'CFBundleShortVersionString': '1.0.0', - 'CFBundleVersion': '1.0.0', + 'CFBundleShortVersionString': '1.0.1', + 'CFBundleVersion': '1.0.1', 'NSHumanReadableCopyright': 'Copyright © 2020 Two Hand Apps. All rights reserved.', 'LSApplicationCategoryType': 'public.app-category.photography', 'NSRequiresAquaSystemAppearance': True # TODO: Support dark mode diff --git a/packaging/win_exe_version_info.txt b/packaging/win_exe_version_info.txt index 17435a3..901ee12 100644 --- a/packaging/win_exe_version_info.txt +++ b/packaging/win_exe_version_info.txt @@ -18,12 +18,12 @@ VSVersionInfo( u'040904B0', [StringStruct(u'CompanyName', u'Two Hand Apps'), StringStruct(u'FileDescription', u'Batch Media Compressor'), - StringStruct(u'FileVersion', u'1.0.0'), + StringStruct(u'FileVersion', u'1.0.1'), StringStruct(u'InternalName', u'Batch Media Compressor'), StringStruct(u'LegalCopyright', u'Copyright \xa9 2020 Two Hand Apps. All rights reserved.'), StringStruct(u'OriginalFilename', u'Batch Media Compressor.exe'), StringStruct(u'ProductName', u'Batch Media Compressor'), - StringStruct(u'ProductVersion', u'1.0.0')]) + StringStruct(u'ProductVersion', u'1.0.1')]) ]), VarFileInfo([VarStruct(u'Translation', [0x409, 1252])]) ] diff --git a/packaging/win_setup.iss b/packaging/win_setup.iss index 84d2d70..5c55a7c 100644 --- a/packaging/win_setup.iss +++ b/packaging/win_setup.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "Batch Media Compressor" -#define MyAppVersion "1.0.0" +#define MyAppVersion "1.0.1" #define MyAppPublisher "Two Hand Apps" #define MyAppURL "https://github.com/sabaatworld/batch-media-compressor" #define MyAppExeName "Batch Media Compressor.exe" diff --git a/pie/core/media_processor.py b/pie/core/media_processor.py index 26fd9f0..97fbe4a 100644 --- a/pie/core/media_processor.py +++ b/pie/core/media_processor.py @@ -100,7 +100,7 @@ def conversion_process_exec(media_file_path: str, target_gpu: int, save_file_pat MediaProcessor.convert_image_file(settings, media_file, original_file_path, save_file_path) if ScannedFileType.VIDEO.name == media_file.file_type: MediaProcessor.convert_video_file(settings, media_file, original_file_path, save_file_path, target_gpu) - MediaProcessor.copy_exif_to_file(settings, original_file_path, save_file_path, media_file.video_rotation) + MediaProcessor.copy_exif_to_file(settings, original_file_path, save_file_path, media_file) media_file.converted_file_hash = MiscUtils.generate_hash(save_file_path) media_file.conversion_settings_hash = conversion_settings_hash with save_file_path_computation_lock: @@ -147,10 +147,13 @@ def convert_video_file(settings: Settings, media_file: MediaFile, original_file_ MiscUtils.exec_subprocess(args, "Video conversion failed") @staticmethod - def copy_exif_to_file(settings: Settings, original_file_path: str, new_file_path: str, rotation: str): + def copy_exif_to_file(settings: Settings, original_file_path: str, new_file_path: str, media_file: MediaFile): args = [settings.path_exiftool, "-overwrite_original", "-tagsFromFile", original_file_path, new_file_path] - if rotation: - args.insert(4, "-rotation={}".format(rotation)) + if ScannedFileType.VIDEO.name == media_file.file_type and media_file.video_rotation: + args.insert(4, "-rotation={}".format(media_file.video_rotation)) + if ScannedFileType.IMAGE.name == media_file.file_type and media_file.extension in ["HEIC", "HEIF"]: + args.insert(4, "-x") + args.insert(5, "Orientation") MiscUtils.exec_subprocess(args, "EXIF copy failed") @staticmethod diff --git a/pie/tray_icon.py b/pie/tray_icon.py index 1bc7058..55a449f 100644 --- a/pie/tray_icon.py +++ b/pie/tray_icon.py @@ -18,7 +18,7 @@ class TrayIcon(QtWidgets.QSystemTrayIcon): - __APP_VER = "1.0.0" + __APP_VER = "1.0.1" __logger = logging.getLogger('TrayIcon') def __init__(self, log_queue: Queue):