Commit graph

663 commits

Author SHA1 Message Date
Michael Mayer
daca63f94e Config: Update error message if .ppstorage file is in originals #1642
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-29 08:41:46 +01:00
Michael Mayer
86dc89c4b9 Config: Show error if originals and storage path seem identical #1642
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-21 14:22:16 +01:00
Michael Mayer
89ca0d8899 Index: Ignore nested storage folder in the originals path #1642
This creates a .ppstorage file in the storage folder so that it can be
automatically ignored if found in the originals path while indexing.

Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-20 17:32:10 +01:00
Michael Mayer
db9b33ddea Backend: Change alias name for map[string]interface{} from Value to Map
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-20 15:01:40 +01:00
Michael Mayer
01da5bdec7 CRC32: Move checksum generation to a dedicated package
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-20 14:56:07 +01:00
Michael Mayer
7e7ba69982 Auth: Add client_uid and client_name to auth_sessions table #808 #3943
This also adds the ability to change the client role if needed and
improves the usage information and output of the CLI commands.

Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-18 16:53:05 +01:00
Michael Mayer
271e7243db Logs: Shorten the names of error log helper functions
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-18 11:23:59 +01:00
Michael Mayer
abfea6354c Config: Allow CORS for fonts and CSS when using a CDN #3931
see https://www.w3.org/TR/css-fonts-3/#font-fetching-requirements

Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-16 20:04:36 +01:00
Michael Mayer
239708f00f Config: Add options to configure CORS origin, headers and methods #3931
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-16 12:14:06 +01:00
Michael Mayer
c5f6a28448 Config: Add PHOTOPRISM_HTTP_CORS option for CDN users #3931 #3940
In addition, the Access-Control-Allow-Origin header is set to the same
URL if an Origin header is found in the request (experimental).

Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-15 13:06:27 +01:00
Michael Mayer
e44262d4ea Config: Ignore configured CDN URL if the same as the Site URL #3931
see https://docs.photoprism.app/getting-started/using-a-cdn/#cloudflare

Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-15 10:54:03 +01:00
Michael Mayer
34b41cf606 Config: Update default wallpaper image
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-12 12:46:18 +01:00
Michael Mayer
481c207897 Cache: Refactor internal/ttl package
Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-10 10:26:38 +01:00
Michael Mayer
f8e0615cc8 Auth: Ensure backwards compatibility for existing API clients #808 #3943
These changes ensure that the new (SHA256) session ID is returned in the
"session_id" field, so that developers have time to update their client
implementations to use the new "access_token" field.

Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-07 12:25:56 +01: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
467f7b1585 OAuth2: Add Client Credentials Authentication #213 #782 #808 #3730 #3943
This adds standard OAuth2 client credentials and bearer token support as
well as scope-based authorization checks for REST API clients. Note that
this initial implementation should not be used in production and that
the access token limit has not been implemented yet.

Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-12-12 18:42:50 +01:00
Michael Mayer
19efee9b6d Config: Change position of "http-cache-public" command flag
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-26 09:04:34 +02:00
Michael Mayer
b67043955d Config: Add trace log for performance measurement #3810
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-15 09:31:57 +02:00
Michael Mayer
0a03071982 SQL: Refactor client config count queries #3742 #3810
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-15 08:42:24 +02:00
Michael Mayer
b7bbc59fca Upgrade: Improve error handling and messages #3813
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-13 12:43:20 +02:00
Michael Mayer
2f9792e541 PWA: Set orientation to any in generated manifest.json #3413
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-10 20:43:44 +02:00
Michael Mayer
fb419e26b7 Settings: Enable delete feature by default #3801
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-08 15:42:23 +02:00
Michael Mayer
0f321b10bc Logs: Update log levels and messages
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-07 16:00:23 +02:00
Michael Mayer
ede4b3b897 Config: Refactor authentication settings #782
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-10-07 11:09:27 +02:00
Michael Mayer
cfe1ff3299 Config: Change "web server" to "Web server" in the docs for consistency
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-09-24 18:05:49 +02:00
Michael Mayer
26ca084699 Videos: Cache embedded media to allow streaming and transcoding #3764
This is a follow-up improvement for the following feature requests that
have already shipped with our stable release:

- Live Photos: Add support for Samsung Motion Photos #439
- Live Photos: Add support for Google Camera Motion Photos #1739

Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-09-24 17:13:06 +02:00
Michael Mayer
4154649c76 FFmpeg: Remove deprecated "-vsync vfr" command flag #3659
See issue comments for details. This also introduces a package constant
for the default ffmpeg command name and updates the tests.

Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-09-06 11:27:24 +02:00
Michael Mayer
386bf823d7 Archive: Show number of archived pictures and improve "delete all" #272
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-09-03 15:44:00 +02:00
graciousgrey
afe2190797 Tests: Add unit tests 2023-08-30 16:30:06 +02:00
Michael Mayer
5b4b57e3bf Config: Improve docs and tests for Unix socket support #2337 #3595
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-08-16 10:14:19 +02:00
Michael Mayer
a287830d1f Videos: Allow setting a lower TTL for caching video content #3631
Adds the new "--http-video-maxage SECONDS" config option.

Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-08-15 11:06:43 +02:00
Michael Mayer
c82a4b2287 HTTP: Refactor Unix socket support #2337 #3595
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-08-14 10:43:05 +02:00
Silver Bullet
2bf50082f5
Backend: Support listening on Unix Socket #2337 #3595
When HTTP listening address starts with unix: and contains /, listen
at given path instead of a TCP socket.

TLS or AutoTLS will not work since there is no TLS layer when using
the unix domain socket.
2023-08-14 10:00:35 +02:00
Michael Mayer
44603857fa Config: Shorten video transcoding flag descriptions #3466 #3498 #3549
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-07-18 16:20:25 +02:00
Michael Mayer
3cf1c699df Video: Refactor FFmpeg Transcoding Size Limit #3466 #3498 #3549
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-07-18 15:15:04 +02:00
Michael Mayer
cc5ff21b4a Video: Add transcoding libs and improve error handling #3466
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-07-15 15:17:41 +02:00
Michael Mayer
651782eb4d Security: Add PHOTOPRISM_DEFAULT_TLS config option #3509
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-07-15 12:01:06 +02:00
Michael Mayer
03f92bc0db Config: Fix expected return value in config_ffmpeg_test.go #3510
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-06-29 10:17:04 +02:00
Lukas
19ac83dd20
Config: Downscale videos based on largest dimension (#3510)
* Adds resolution limit

* Fixes 2 video filters and makes the env variable work

* Adds FFMPEG_RESOLUTION to all the docker-compose files

* Makes the resolution based on the longer side

* Fixes failing test
2023-06-29 10:07:47 +02:00
Michael Mayer
8e43186454 Config: Generate default HTTPS/TLS certificate on first startup #3509
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-06-28 16:50:04 +02:00
Michael Mayer
a6d3eee331 Config: Fix FFmpegResolution() func and related test #3498
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-06-28 16:45:53 +02:00
Lukas
83d10ea00e
Config: Add video transcoding resolution option (#3498)
* Adds resolution limit

* Fixes 2 video filters and makes the env variable work

* Adds FFMPEG_RESOLUTION to all the docker-compose files
2023-06-28 15:22:52 +02:00
Michael Mayer
a7c8f0102f Config: Refactor directory initialization and improve inline docs
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-06-14 16:44:45 +02:00
Michael Mayer
59bf7cb9bd Config: Update CSP header to allow loading content from a CDN #3454
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-06-07 09:22:10 +02:00
Michael Mayer
bff649469d Config: Make PhotoPrism compatible with MariaDB 11 #3443
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-06-02 17:07:10 +02:00
Michael Mayer
7c0af33b73 Backend: Update Go dependencies
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-06-01 16:35:07 +02:00
Michael Mayer
0b780defbb Config: Update flags.go and cli_flags_test.go
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-05-13 19:38:54 +02:00
Michael Mayer
0e415fec1c Config: Make options available to all users
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-05-13 16:02:49 +02:00
Matthew Roy
7abf5c70cf Clarify trusted-proxy option env TRUSTED_PROXY
Clarify that PHOTOPRISM_TRUSTED_PROXY is passed to Gin per 457fabd7e1/docs/doc.md (dont-trust-all-proxies)
2023-05-07 17:13:42 +02:00