Skip to content

Commit

Permalink
Merge branch 'main' into feature/qtff-pr
Browse files Browse the repository at this point in the history
  • Loading branch information
HernandoR authored Oct 15, 2023
2 parents b7c2af7 + 0d254e9 commit 79b45b1
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fail-fast: false
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Changelog

## WIP
## v2.4.3 (2023-10-14)

- Modified filter: `exif`. Enabled datetime fields on exif data (Issue #266) (Thanks @FlorianFritz)
- Support Exif data from Huawei and Honer phones (Thanks @HernandoR)

## v2.4.2 (2023-08-25)

Expand Down
2 changes: 1 addition & 1 deletion organize/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.4.2"
__version__ = "2.4.3"
4 changes: 2 additions & 2 deletions organize/filters/exif.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ def to_datetime(key: str, value: str) -> ExifValue:
converted_value: ExifValue = value
if "datetime" in key:
# value = "YYYY:MM:DD HH:MM:SS" --> convert to 'datetime.datetime'
converted_value = datetime.strptime(value, "%Y:%m:%d %H:%M:%S")
converted_value = datetime.strptime(value[:19], "%Y:%m:%d %H:%M:%S")
elif "date" in key:
# value = "YYYY:MM:DD" --> convert to datetime.date
converted_value = datetime.strptime(value, "%Y:%m:%d").date()
converted_value = datetime.strptime(value[:10], "%Y:%m:%d").date()
elif "offsettime" in key:
# value = "+HHMM" or "+HH:MM[:SS]" or "UTC+HH:MM[:SS]"
# --> convert to 'datetime.timedelta'
Expand Down
Loading

0 comments on commit 79b45b1

Please sign in to comment.