Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bundled exiftool path in renamer #5

Merged
merged 1 commit into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion check_for_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import requests

def check_for_updates():
current_version = "1.1.1"
current_version = "1.1.2"
repo_owner = "rwpi"
repo_name = "videotimestamp"

Expand Down
6 changes: 4 additions & 2 deletions magicrenamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ def get_resource_path(relative_path):
return full_path

def get_metadata(file_path):
'''Extracts the CreateDate and Duration from the file's metadata.'''
exiftool_path = get_resource_path('exiftool')
if sys.platform == "darwin": # If the host machine is macOS
exiftool_path = os.path.join(sys._MEIPASS, 'exiftool', 'exiftool') # Use the bundled exiftool
else:
exiftool_path = get_resource_path('exiftool')

create_date_command = [exiftool_path, '-CreateDate', '-s', '-s', '-s', file_path]
duration_command = [exiftool_path, '-Duration', '-s', '-s', '-s', file_path]
Expand Down