Commit Graph

13 Commits

Author SHA1 Message Date
Sean Morley
381b693de5 Add tests for protected media access and enhance file permission checks
- Introduced a new test suite for validating access to protected media files based on user authentication and ownership.
- Updated file permission logic to include checks for activity-related media paths.
- Enhanced media serving logic to differentiate between public and protected media paths, ensuring proper access control.
2026-07-24 17:21:30 -04:00
Sean Morley
aec4ac576e Enhance image metadata resolution by updating fallback logic for GPS extraction and integrating Immich coordinates. Added unit tests to verify new behavior and updated frontend to support immichId in image uploads. 2026-07-21 17:59:45 -04:00
Sean Morley
69ece825a8 Enhance image metadata handling and add HEIF support
- Updated `requirements.txt` to include `pillow-heif` for HEIF image format support.
- Modified `ContentImage` model to retain image metadata during processing.
- Implemented new functions for GPS coordinate normalization and conversion from DMS to decimal format in `metadata.py`.
- Added unit tests for DMS conversion and GPS extraction from JPEG images in `test_image_metadata.py` to ensure accuracy and reliability.
2026-07-20 20:42:38 -04:00
Sean Morley
bf063b0632 Refactor sunrise/sunset functionality and introduce caching
- Renamed `ExternalSunTimesThrottle` to `ExternalSunriseSunsetThrottle` for clarity.
- Added `SunriseSunsetAPI` view to handle sunrise and sunset data retrieval.
- Implemented caching for sunrise/sunset data using `get_or_fetch_cached`.
- Created new service functions for fetching sunrise/sunset data from the external API.
- Updated related tests to ensure proper functionality and caching behavior.
- Removed deprecated sun times handling from the `LocationViewSet` for cleaner code.
2026-07-08 20:15:09 -04:00
Sean Morley
fe30ad90e6 Implement timezone-aware date handling and normalization for visits
- Added utility functions to ensure datetime values are UTC-aware, improving consistency in date handling across the application.
- Introduced migrations to update existing visit records, making start and end dates timezone-aware.
- Normalized all-day visit end dates to UTC midnight, ensuring accurate representation of all-day events.
- Updated serializers and services to utilize new datetime utilities, enhancing the handling of visit dates in various contexts.
- Added comprehensive tests for new datetime utilities to ensure correct functionality and edge case handling.
2026-07-08 17:11:56 -04:00
Sean Morley
26e530a403 Enhance image source inference and add tests for hostname validation
- Introduced a helper function to check if a hostname matches a given domain, improving the clarity of the `infer_source_from_url` function.
- Updated the image source inference logic to utilize the new helper function for better maintainability.
- Added a test case to ensure that spoofed hostnames do not match valid image sources, enhancing security and robustness of the inference logic.
- Updated Docker Compose configuration to ensure the correct image is used for the backend service.
2026-06-30 20:55:42 -04:00
Sean Morley
ab698ee8ba Add image source metadata and GPS coordinates handling for ContentImage
- Introduced a new `source` field in the `ContentImage` model to track the origin of images (e.g., upload, Google, Wikipedia, URL, Immich).
- Added a `source_url` field to store the URL associated with the image source.
- Implemented a `coordinates` field to store GPS data for images.
- Enhanced the `ContentImageSerializer` to include the new fields and updated the representation logic.
- Created a management command to backfill GPS coordinates for existing images based on EXIF data or Immich metadata.
- Added utility functions for resolving image metadata and creating `ContentImage` instances with proper source and coordinates.
- Updated various views and services to utilize the new image source and coordinates features.
- Added tests to ensure the correct functionality of the new features and metadata handling.
2026-06-30 20:38:59 -04:00
Sean Morley
f2df546f9e Add tests for collection sharing and update user profile handling
- Introduced a new test suite for collection sharing functionality, verifying user metadata, profile privacy changes, and unsharing behavior.
- Updated the `UserDetailsSerializer` to handle the impact of making a profile private, including revoking shared collections and pending invites.
- Enhanced the frontend to display warnings related to shared collections and pending invites when toggling profile visibility.
- Updated localization files to include new strings for user feedback regarding profile sharing impacts.
2026-06-27 21:24:12 -04:00
Sean Morley
686c9c9768 Implement dashboard service and user statistics features
- Added dashboard service to aggregate user data, including recent locations, upcoming trips, active trips, and events.
- Introduced UserStatsService for calculating user activity statistics and visited locations.
- Created unit tests for dashboard functionality to ensure data integrity and expected responses.
- Updated frontend components to display dashboard data, including user stats and trip information.
- Enhanced localization support for dashboard-related strings in the application.
2026-06-25 19:22:18 -04:00
Sean Morley
794f403d80 Implement permission checks for shared users and anonymous access in collection views. Enhance tests for fetching and exporting images and PDFs based on user permissions. Update app version to v0.12.1-beta-061626. 2026-06-16 16:01:59 -04:00
Sean Morley
1a6a7be964 Implement global search functionality with new API and UI components
- Added a new global search API endpoint to handle search queries across various entities including locations, collections, and users.
- Introduced SearchHitSerializer to standardize the response format for search results.
- Developed a command palette for enhanced search experience, allowing users to quickly access search functionalities.
- Created frontend components for displaying search results, including a dedicated SearchResultRow component.
- Implemented recent searches feature to improve user experience by remembering previous queries.
- Updated localization strings to support new search features and improve user guidance.
- Added tests to ensure the reliability of the search functionality and its integration with existing components.
2026-06-03 18:43:33 -04:00
Sean Morley
db9f4a66f6 Add PDF generation for collections and enhance admin functionality
- Implemented PDF generation for collections, allowing users to create printable itineraries.
- Added support for Noto fonts to ensure proper rendering of text and emojis in PDFs.
- Enhanced admin interfaces for achievements and adventures, improving usability and data management.
- Introduced new fields and methods in models and serializers to support geolocation features and improve data handling.
- Updated migrations to transition from latitude/longitude fields to a unified PointField for geographic data.
- Added tests to validate PDF generation functionality and ensure reliability.
2026-06-03 17:39:24 -04:00
Sean Morley
e3b0e0dc1d Geocoding service/provider framework 2026-05-31 20:43:27 -04:00