Commit graph

257 commits

Author SHA1 Message Date
Keith Martin
b6687b6c29
Tests: Improve isolation and add fixes #5263
* Tests: fix random selection of deleted record causing test failure
* Tests: fix test folders being left after test
* Tests: ensure that required records are available
* Tests: make each package execute against it's own testdata folder to ensure no interpackage test failures
* Tests: add unit tests of CleanupTestFolder
* Tests:  Allow defer in TestMain
* Tests: rename testMain to runTestMain
2026-07-12 05:47:21 +02:00
Michael Mayer
d33bca4f48 Metadata: Fix XMP body serial and add tiff: field fallbacks #2260
Read the standard exifEX:BodySerialNumber property, which ExifTool and
Adobe emit; the previous exifEX:SerialNumber matched no compliant XMP
sidecar and silently fell through to aux:SerialNumber.

Add deprecated TIFF-schema fallbacks still emitted by some writers:
tiff:Software (Software), tiff:ImageDescription (Description), and
tiff:Copyright (Copyright).
2026-07-07 11:44:33 +00:00
Michael Mayer
6dc3ecbf25 Metadata: Map XMP dc:subject to Subject field, not Keywords #2075 #2260
dc:subject is Adobe's "Keywords" panel, but PhotoPrism's Keywords,
Labels, and Subject fields serve distinct purposes. Route dc:subject to
the descriptive Details.Subject field only (matching the embedded/
ExifTool path, where data.Subject comes from the dc:subject-backed
Subject tag and data.Keywords from IPTC Keywords), never the Keywords
field. Multi-word entries keep their spaces; the value stays searchable
via IndexKeywords and still drives label matching.
2026-06-30 10:12:45 +00:00
Cathie Integra
3f096a592b Links: Use canonical trailing-slash form for website URLs 2026-06-24 17:20:30 +02:00
Ömer Duran
3ea547a564
Lightbox: Add support for 360° photos and videos #352 #4718 #5623
* Lightbox: Add 360° photo and video sphere viewer support

Wires Photo Sphere Viewer v5 into the lightbox for equirectangular
media. Backend detects UsePanoramaViewer and IsPhotosphere markers
alongside ProjectionType, and exposes Panorama + Projection in the
viewer / search result DTOs so the frontend can dispatch on the
projection type. The renderer (ThreeJS + PSV core + video plugin +
equirectangular video adapter) is lazy-loaded into a dedicated
webpack chunk so the base bundle is unchanged for users with no
360° media. PhotoPrism's existing lightbox controls drive the
underlying HTMLVideoElement that the PSV adapter creates for 360°
videos. Includes Vitest coverage for the sphere helper and the
lightbox dispatch, plus a TestCafe smoke spec and three new
ExifTool metadata fixtures.

* Lightbox: Fix 360° controls leak, hide zoom button, add sidebar icon

* Lightbox: Fix 360° touch panning and navigation arrows

* Lightbox: Fix fast swipe switching photos on 360° slides

Suppress PhotoSwipe swipe/drag navigation at its source via the dispatched pointer hook while a sphere slide is active, since the per-element gesture trap is outrun by a fast swipe whose pointer leaves the sphere container (touch-capable Windows). UI controls stay excluded so buttons and arrows still navigate.

* Lightbox: Route only equirectangular media to the 360° viewer

Routing was based on the loose photo_panorama flag for videos, which is also
true for cubemap and merely-wide (aspect > 1.9) videos, so non-equirectangular
media wrongly opened, distorted, in the sphere viewer. Route strictly on the
equirectangular projection for both photos and videos. Surface the video file's
projection in the viewer DTO via Photo.MediaProjection() (the primary search row
is a poster JPEG with no projection). Add an MP4 metadata-detection test.

* Lightbox: Open tagless 2:1 360° videos in the sphere viewer

Many 360° videos carry no projection tag PhotoPrism can read, so strict
equirectangular-projection routing left them in the flat player. Fall back to
equirectangular's defining 2:1 frame for panorama-flagged videos without a
projection, via is360Equirectangular() in common/sphere.js, while cubemap and
ultrawide (~2.35:1) clips stay flat.

* Tests: Make the 360° sphere video test assert instead of skipping
2026-06-17 03:26:25 +02:00
Michael Mayer
a2e708e7ab Meta: Update go-mp4, regenerate NOTICE, fix XMP doc spelling #2260 #5563
Bump abema/go-mp4 to v1.7.1 (only outdated direct dependency) and tidy
go.sum, pruning stale checksums left by the XMP sidecar merge. Regenerate
the license NOTICE for the updated dependency.

Use US-English spelling in the new XMP sidecar comments and tests, and
drop a specs/ reference from internal/meta/README.md so the public package
doc has no link into the private subrepo. Regenerate dialect_mysql.go from
SQL.
2026-06-17 00:14:33 +00:00
Ömer Duran
86efc1c982
Index: Improve support for metadata in XMP sidecar files #2260 #2828 #5563
* Meta: Add XMP sidecar fixture corpus for reader rewrite #2260
* Meta: Replace XMP sidecar reader with antchfx/xmlquery #2260
* Meta: Add XMP sidecar reader test suite #2260
* Meta: Assert XMP GPS extraction on Apple/Adobe sidecars #2828
* Meta: Apply XMP sidecar metadata to photo and primary file #2260
* Meta: Resolve XMP sidecar time zone via shared helper #2260
* Meta: Derive panorama & caption keywords on XMP sidecar reads #2260
* Meta: Assert XMP sidecar GPS override and malformed-file handling #2260
* Meta: Tidy XMP sidecar reader comments and reuse logName local #2260
* Meta: Fix XMP sidecar capture-time priority OffsetTime handling #2260
* Meta: Address XMP sidecar review feedback #2260
2026-06-17 01:53:28 +02:00
Michael Mayer
9e5b94189e Video: Recognize MagicYUV in the probe and exclude the VFW wrapper #5617
Recognize MagicYUV sample entries in the built-in go-mp4 probe and consider the
probe's codec in addition to the metadata codec when applying the FFmpeg exclude
list, so a video can be matched even when one detector misses it. Rename the
shared sample-entry scan limit to CodecHeadScanLimit.

Also exclude the Matroska Video for Windows wrapper (v_ms/vfw/fourcc) by default,
since its actual codec is not exposed by metadata and the format is uncommon.
2026-05-30 21:29:12 +00:00
Michael Mayer
803ee6ce69 Video: Improve codec detection and exclude-list alias matching #5617
Read the video codec from the AVI VideoCodec metadata tag instead of falling
back to the container name, so codec-based entries on the FFmpeg exclude list
are applied during indexing.

Match exclude-list codecs by their canonical alias so the original name
reported by a metadata tool (e.g. m8ra), the human-readable name (magicyuv),
and the canonical FourCC (magy) are treated as equivalent. Add h264/h265
aliases and make magy the canonical MagicYUV codec name.
2026-05-30 21:02:19 +00:00
Michael Mayer
570a563748 Docs: Bump copyright year to 2026 in Go package headers 2026-05-25 14:39:38 +00:00
Michael Mayer
f2aabb9bcd Security: Add gosec fixes with shared URL and fs validation helpers
Signed-off-by: Michael Mayer <michael@photoprism.app>
2026-03-03 16:38:41 +01:00
Michael Mayer
ad7458c94e Backend: Change Markdown table alignment in internal/ and pkg/
Signed-off-by: Michael Mayer <michael@photoprism.app>
2026-02-21 05:13:57 +01:00
Michael Mayer
a2b7615c93 Go: Apply go fix modernizations across backend packages
Run `go fix ./...` and keep mechanical modernization updates.

- Replace `interface{}` with `any` in signatures and local types
- Apply formatter/style cleanups from go1.26 tooling
- Keep `omitempty` behavior-preserving simplifications suggested by fix
- No functional feature changes intended

Validation:
- go test ./... -run '^$' -count=1 (Go 1.26.0)
- GOTOOLCHAIN=go1.24.10 go test ./... -run '^$' -count=1

Signed-off-by: Michael Mayer <michael@photoprism.app>
2026-02-20 03:54:33 +01:00
Michael Mayer
cd7affffeb Cleanup: Fix formatting of Markdown files
Signed-off-by: Michael Mayer <michael@photoprism.app>
2026-02-14 12:10:43 +01:00
Michael Mayer
3dbf6d359a Metadata: Clamp invalid Google JSON GPS coordinates to geo bounds #5373
Also see: https://github.com/photoprism/photoprism/issues/5445

Signed-off-by: Michael Mayer <michael@photoprism.app>
2026-02-11 13:42:58 +01:00
Michael Mayer
162b383f31 Docs: Add internal/meta/README.md to document the "meta" package
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-11-22 12:48:58 +01:00
Michael Mayer
10d6ca36b7 CI: Apply Go linter recommendations to "internal/meta" package #5330
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-11-22 12:38:24 +01:00
Michael Mayer
a921f82a17 Pkg: Move /service/http/... to /http/... and add package /http/dns
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-10-19 21:08:48 +02:00
Michael Mayer
829d4291fd CLI: Improve photoprism dl command with additional flags #5261
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-10-12 19:41:08 +02:00
Michael Mayer
94b6631b3d Test: Use PascalCase names for all Go subtests in /internal
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-10-02 14:50:02 +02:00
Michael Mayer
bbf6580512 Meta: Add const, func, and struct comments for easier troubleshooting
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-09-30 22:00:30 +02:00
Michael Mayer
61ced7119c Auth: Refactor cluster configuration and provisioning API endpoints #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-09-24 08:28:38 +02:00
Michael Mayer
023fbe3a1d Pkg: Add service/cluster package & rename media/http → service/http #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-09-13 12:58:28 +02:00
Simon Rettberg
00d1cddf37
Metadata: Update list of unwanted descriptions (#5078)
Signed-off-by: Simon Rettberg <simon.rettberg@rz.uni-freiburg.de>
2025-06-29 17:15:01 +02:00
Michael Mayer
2e2ebab433 Videos: Improve downloading, remuxing, and transcoding #4982 #4892 #5040
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-06-09 15:31:23 +02:00
Michael Mayer
4c7ca93dcc Metadata: Improve handling of Local and UTC timezones #4622 #4946
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-04-23 15:08:15 +02:00
Michael Mayer
5cd2c25489 Metadata: Move timezone related functions to /pkg/time/tz #4622 #4946
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-04-23 12:50:12 +02:00
Michael Mayer
2a9741e826 Metadata: Default to "Local" if no time zone is set #4946
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-04-22 14:44:50 +02:00
Michael Mayer
27b72aa1e9 Search: Parse lat,lng string into float64 coordinates #4930 #4812
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-04-19 16:04:44 +02:00
Michael Mayer
5f32d75700 Metadata: Use "Local" as identifier for the local time zone #4946
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-04-16 17:12:37 +02:00
Michael Mayer
47e740fd88 Metadata: Use "github.com/ugjka/go-tz/v2" instead of custom fork
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-03-27 16:34:47 +01:00
Michael Mayer
f747211017 Library: Add support for indexing PDF documents #4600
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-03-12 04:26:04 +01:00
Michael Mayer
501ef56c97 Videos: Support for detection and streaming of additional formats #4770
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-02-06 14:27:47 +01:00
Michael Mayer
ef66ddbb8c API: Compare video formats by content type for better matching #4770
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-02-05 03:42:40 +01:00
Michael Mayer
6a89519e63 Videos: Refactor codec, content and file type specifications #4770
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-02-05 00:30:45 +01:00
Michael Mayer
a20f12f3e7 Videos: Enhance support for direct streaming of HEVC / H.265 #1307 #3168
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-01-29 13:14:38 +01:00
Michael Mayer
420fa9946c Viewer: Set native video stream src based on mimetype #1307 #3168 #4698
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-01-27 13:21:05 +01:00
Michael Mayer
ebeaaf568b Metadata: Set labels based on matching keywords in the caption #4603
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-01-17 06:24:29 +01:00
Michael Mayer
0ada8d1095 API: Add additional fields to label and subject edit forms #383 #3168
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-01-17 02:55:07 +01:00
Michael Mayer
01f15fa406 Backend: Update copyright notices
Signed-off-by: Michael Mayer <michael@photoprism.app>
2025-01-09 10:28:17 +01:00
Michael Mayer
05cbee204f Scans: Add support for "KODAK Slide N Scan" digital film scanner #4581
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-10-18 02:50:08 +02:00
Michael Mayer
735a3a2d13 Places: Use float64 for all coordinates to avoid rounding errors #3953
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-09-15 13:52:31 +02:00
Michael Mayer
095c8fd944 Backend: Move projection package to /pkg/media/projection
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-07-03 09:17:34 +02:00
Michael Mayer
8b8a1fd7c4 Backend: Move video package to /pkg/media/video
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-07-03 09:16:27 +02:00
Michael Mayer
83e7c9b0fa Backend: Move s2 package to /pkg/geo/s2
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-07-03 09:12:52 +02:00
knowmost
020e9e7e19 chore: fix some comments and typos
Signed-off-by: knowmost <knowmost@outlook.com>
2024-04-28 08:19:20 +02:00
Michael Mayer
0ca37b2c92 Docs: Update year in backend and frontend package file headers
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-05 16:38:36 +01:00
Michael Mayer
713593da4e Auth: Add CLI command to create access tokens for apps #782 #808 #3943
You can now run "photoprism auth add" to create new client access tokens
that allow external applications to use the built-in REST API.

Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-05 16:31:07 +01:00
Michael Mayer
cc179e9ecf Metadata: Stack media files with the same "ContentIdentifier" #3960
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-12-19 16:55:08 +01:00
Michael Mayer
9abea5b55f Metadata: Ignore "SubSecModifyDate" in Exiftool JSON files #3780
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-21 17:32:42 +02:00