Skip to content

Commit

Permalink
Merge pull request #5 from rwpi/VTS-1.1.2
Browse files Browse the repository at this point in the history
fix bundled exiftool path in renamer
  • Loading branch information
rwpi committed Mar 30, 2024
2 parents 2c49091 + d6e4986 commit 1434fd8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
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

0 comments on commit 1434fd8

Please sign in to comment.