Merge pull request #447 from Freika/fix/immich-timeframe-limiting-params

Fix retrieving photos from Immich with timeframes
This commit is contained in:
Evgenii Burmakin 2024-11-27 16:46:50 +01:00 committed by GitHub
commit cb1665d8be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 3 deletions

View file

@ -1 +1 @@
0.17.1
0.17.2

View file

@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
- Retrieving photos from Immich now using `takenAfter` and `takenBefore` instead of `createdAfter` and `createdBefore`. With `createdAfter` and `createdBefore` Immich was returning no items some years.
# 0.17.1 - 2024-11-27
### Fixed
- Retrieving photos from Immich now correctly handles cases when Immich returns no items. It also logs the response from Immich for debugging purposes.
# 0.17.0 - 2024-11-26

View file

@ -61,7 +61,7 @@ class Immich::RequestPhotos
def request_body(page)
body = {
createdAfter: start_date,
takenAfter: start_date,
size: 1000,
page: page,
order: 'asc',
@ -70,7 +70,7 @@ class Immich::RequestPhotos
return body unless end_date
body.merge(createdBefore: end_date)
body.merge(takenBefore: end_date)
end
def time_framed_data(data)