diff --git a/CHANGELOG.md b/CHANGELOG.md index cb89cc9f..1373d0fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,25 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -# 0.17.1 - 2024-11-27 +# 0.18.0 - 2024-11-28 + +## The Trips release + +You can now create, edit and delete trips. To create a trip, click on the "New Trip" button on the Trips page. Provide a name, date and time for start and end of the trip. You can add your own notes to the trip as well. + +If you have points tracked during provided timeframe, they will be automatically added to the trip and will be shown on the trip map. + +Also, if you have Immich integrated, you will see photos from the trip on the trip page, along with a link to look at them on Immich. + +### Added + +- The Trips feature. Read above for more details. + +### Changed + +- Maps are now not so rough on the edges. + +# 0.17.2 - 2024-11-27 ### Fixed diff --git a/app/helpers/trips_helper.rb b/app/helpers/trips_helper.rb deleted file mode 100644 index 04f333d4..00000000 --- a/app/helpers/trips_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module TripsHelper -end diff --git a/app/models/trip.rb b/app/models/trip.rb index 44f202ab..22688770 100644 --- a/app/models/trip.rb +++ b/app/models/trip.rb @@ -22,7 +22,7 @@ class Trip < ApplicationRecord user, start_date: started_at.to_date.to_s, end_date: ended_at.to_date.to_s - ).call + ).call.reject { |asset| asset['type'].downcase == 'video' } # let's count what photos are more: vertical or horizontal and select the ones that are more vertical_photos = immich_photos.select { _1['exifInfo']['orientation'] == '6' } diff --git a/app/services/immich/request_photos.rb b/app/services/immich/request_photos.rb index c60dbcec..0f1eabc7 100644 --- a/app/services/immich/request_photos.rb +++ b/app/services/immich/request_photos.rb @@ -52,7 +52,7 @@ class Immich::RequestPhotos page += 1 end - data.flatten.reject { |asset| asset['type'].downcase == 'video' } + data.flatten end def headers diff --git a/app/views/trips/_trip.html.erb b/app/views/trips/_trip.html.erb index 87b36e7f..fd43c6cc 100644 --- a/app/views/trips/_trip.html.erb +++ b/app/views/trips/_trip.html.erb @@ -1,2 +1,24 @@ -
+ <%= "#{human_date(trip.started_at)} – #{human_date(trip.ended_at)}, #{trip.distance} #{DISTANCE_UNIT}" %> +
+ +- <%= "#{human_date(trip.started_at)} – #{human_date(trip.ended_at)}, #{trip.distance} #{DISTANCE_UNIT}" %> -
- -