Commit Graph

576 Commits

Author SHA1 Message Date
Kostiantyn
91bf79a86e Bump gqlgen and its indirect dependencies in API (#1123)
Co-authored-by: Konstantin Koval
2024-11-16 16:00:47 +02:00
Kostiantyn
3cf63e7e2b Bump gqlparser, crypto, image, and their deps to the latest versions (#1117)
Co-authored-by: Konstantin Koval
2024-11-09 19:02:43 +02:00
Kostiantyn
a0a2380f90 Remove deprecated convert and add required -auto-orient flags (#1118)
Co-authored-by: Konstantin Koval
2024-11-09 18:49:53 +02:00
Googol Lee
7b69f247d3 Fix gqlgen (#1105) 2024-11-02 17:05:29 +01:00
Googol Lee
84c642ca79 Fix gqlgen code (#1099) 2024-10-23 20:40:14 +02:00
Googol Lee
c151bdee96 Process jpgs if raw processing is disabled. (#1096) 2024-10-20 16:52:47 +02:00
Kostiantyn
7e3f76aba8 Bump github.com/vektah/gqlparser/v2 from 2.5.17 to 2.5.18 in /api (#1100)
Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-10-17 18:12:28 +02:00
bzzim
2f13094d08 Fix wrap nil error (#1042)
* Fix wrap nil error

In this case ReadVideoStreamMetadata return nil, nil because: 

func Wrap(err error, message string) error {
	if err == nil {
		return nil
	}
	.....
}

* Update process_video_task.go
2024-10-14 14:16:58 +02:00
Googol Lee
4303b71311 Use hardware acceleration when converting videos. (#1056) 2024-10-11 22:27:56 +02:00
Kostiantyn
dd90d476ad Refactoring part 2.4: Long func refactoring in graphql/resolvers (#1076)
* Split long functions and optimize code

* Addressing comments

* Remove unnecessary input param

---------

Co-authored-by: Konstantin Koval
2024-10-11 12:31:49 +03:00
Kostiantyn
7e0c38b5b4 Bump github.com/99designs/gqlgen, golang.org/x/crypto, golang.org/x/image, golang.org/x/sys, golang.org/x/text (#1094)
Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-10-11 10:23:42 +02:00
Kostiantyn
69e595000d Refactoring part 2.11: Long func refactoring in server and utils (#1083)
* Split long functions and optimize code

* Addressing comments

---------

Co-authored-by: Konstantin Koval
2024-10-09 18:20:03 +03:00
Kostiantyn
83e441650b Split long functions and optimize code (#1082)
Co-authored-by: Konstantin Koval
2024-10-08 21:58:17 +03:00
Kostiantyn
5fc8feb75e Refactoring part 2.3: Long func refactoring in graphql/models (#1075)
* Split long functions and optimize code

* 2 more small files

---------

Co-authored-by: Konstantin Koval
2024-10-08 21:10:34 +03:00
Kostiantyn
f8b9590aa9 Refactoring part 2.1: Long func refactoring in database (#1073)
* Split long functions and optimize code

* Replace `errors.Wrap()` with the `fmt.Errorf()`; rename `process*()` functions to `parse*()`

---------

Co-authored-by: Konstantin Koval
2024-10-04 16:49:41 +03:00
Kostiantyn
57d5ac5235 Bump version (#1070)
Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-10-01 16:11:02 +02:00
Kostiantyn
dee3a151e9 Update GitHub workflows with various improvements (#1028)
Updated DB images in tests to align with the PROD setup
Try to upload coverage only if tests were executed (passed or failed) - not skipped or canceled
Added ESLint execution after UI tests with results exported to artifact
Shifted scheduled run time from 00 minutes according to GitHub recommendations, as the 00 minutes of each hour is the busiest time
Dynamically extract a list of langs from the repo to use them for CodeQL analysis instead of hardcoded ones
Updated versions of several outdated actions
Added the Autobuild step before CodeQL analysis for GO
Added the Anchore dependency scan job, reporting to the Security tab. I can add steps to manage PR comments with the results, but I need a token to be provided by @viktorstrate
Added the Hadolint Dockerfile scan job, reporting to the Security tab. I can add steps to manage PR comments with the results, but I need a token to be provided by @viktorstrate
Implemented weekly rebuild of images for the latest commit in the master branch and the latest released tag. It will recreate images with the recent base image and 3rd-party dependencies even if there were no new pushes for a long time
Added the Dockle container analysis job to be run on master and tag and validate just pushed images, reporting to the Security tab
Added golangci-lint config to the /api folder, as a starting point and for local usage
Added 2 weekly jobs for Dependabot:
-- Maintain dependencies for GitHub Actions
-- Maintain dependencies for Dockerfile

---------

Co-authored-by: Konstantin Koval
2024-10-01 15:50:44 +03:00
Kostiantyn
d1193c5ca4 Refactoring part 1: Fix some annoying linter warnings in API code (#1064)
* names, constants of reusable strings, removed unneeded `if`, replaced deprecated imports

* more deprecated imports replaced

* What is this?))

* Fix a path and quote a var in Dockerfile

* Addressing review comments

---------

Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-09-30 14:45:02 +02:00
Kostiantyn
70a3944e21 Bump gqlgen (#1061)
Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-09-30 11:07:25 +02:00
Googol Lee
a1263feac4 Update gqlgen and fix the code. (#1055) 2024-09-17 17:00:03 +02:00
Googol Lee
340c181442 Use self-building dependencies and update the code with imagemagick. (#1053) 2024-09-17 15:02:23 +02:00
Kostiantyn
e8914e0890 new deps (#1048)
Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-09-12 22:17:01 +02:00
Googol Lee
a6cbfc76f3 Back to bookworm. (#1040) 2024-09-06 13:32:22 +02:00
Googol Lee
6e1e1d12ce Update to magick 7 in alpine. (#1035) 2024-09-02 22:12:00 +02:00
Googol Lee
ad13172a32 Switch to Debian testing and imagemagick. (#1021) 2024-08-29 10:30:06 +02:00
Jorilx
bef9e7c666 Add support for GIF images (#1024) 2024-08-20 22:41:30 +02:00
Kostiantyn
5438fbb3f4 Update crypto and image versions (#1015)
Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-08-11 20:02:24 +02:00
Googol Lee
cf1a66975d API server listens with the address of PHOTOVIEW_LISTEN_IP, #1010. (#1014)
Fix the listened host reference in the `main()` function
2024-08-09 17:32:07 +03:00
Kostiantyn
4d9ce30583 Bump 'crypto' and 'gorm' versions based on Dependabot PRs (#1008)
Co-authored-by: Konstantin Koval
2024-08-03 19:36:18 +03:00
Googol Lee
bdae9a67ce Add Set up Docker development environment in README.md (#997) 2024-07-23 21:56:30 +02:00
Googol Lee
0345bc1481 Update Set up development environment in README.md. (#995) 2024-07-16 23:10:38 +02:00
Googol Lee
eab10af4a3 Remove loading env from tests. (#988)
* Remove loading env from tests.

* Rollback the test workflow.
2024-07-03 21:28:36 +03:00
Lajos Koszti
10e9e354b5 order root albums by path on settings page (#983)
Once you have more than a few paths assigned to a user, it becomes
quite hard to oversee the list.

Personally, I would add my albums to Photoview one by one, so I can
manage the processing better. For example, I can review and fix the face
recognition for one new album at a time, and I don't need to deal with
too much data.
Since I started to add the albums in a random order, it's relatively
hard to find which album is added and which is not.

An easy fix is to order the photo paths by their name.

- Extended the query of the rootAlbums to order them by path
2024-07-01 20:04:50 +02:00
Kostiantyn
df9af39a16 Validate incoming GPS data (#951)
* Validate incoming GPS data and throw an error if it is incorrect, storing Null values

* Extracted GPS data processing to function in external parser; optimized IF in internal parser; removed unnecessary comments; set exact values for positive test

* Add the migration for removing existing invalid GPS data and its test; added better errors to asserts in the GPS validation test

* Install FFmpeg and ExifTool on the API unit-test environment

* Fix 'stripped.jpg', 'IncorrectGPS.jpg', and 'CorrectGPS.jpg' tests for the external parser

* Optimized data validation in the external parser, returned error by the internal parser for invalid data, updated test to expect errors and handle them

* Switched from error to log entry in case of incorrect GPS data, as error handling is not so transparent in the internal parser

---------

Co-authored-by: Konstantin Koval
2024-06-29 10:32:48 +03:00
Kostiantyn
55d6097cc1 Update GO version in the go.mod and read it by the job to setup the testing environment for unit tests (#980)
Co-authored-by: Konstantin Koval
2024-06-28 14:59:31 +02:00
Googol Lee
e36b09753a Bump go version and modules. (#976)
* Bump go version to 1.22. Bump all go module to the newest version, except pinning libheif@v1.15.1 to match the c lib version in Debian bookworm.

* Update go_wrapper.sh to fit golang image.

* Update the way to set go envs.

* Test against go 1.22

* Set default shell for all building stage in Dockerfile.
2024-06-28 10:10:18 +03:00
Googol Lee
1cd34109b6 Optimize user's album filter. #705 (#962) 2024-06-27 21:21:09 +02:00
Googol Lee
ddacba85db Fix timeline order with sqlite3. It should be ordered as MySQL and PGSQL like (year, month, day). (#954) 2024-05-31 09:35:41 +01:00
Kostiantyn
d47bca280e configure SQLite to work in multi-connection mode, so it is not locked when scanner runs a job (#955)
Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-05-31 09:32:47 +01:00
Jordan Hellier
4133694bc2 fix: remove logging of database url in place for just dialect (#940) 2024-04-27 13:18:56 +01:00
Alex Kabakaev
d6f34211a1 fix false trigger of DB migration on sqlite (#936) 2024-04-26 05:46:32 +01:00
Jordan Hellier
f900d55300 Fix audit issues in production (#933)
* chore: upgrade api dependencies to latest compatible version

* chore: update ui dependencies first pass

* chore: migrate ui dependency to latests

Migrates i18next-parser from 6.x -> 8.x per documentation

* chore: add missing tools file

* chore: regenerate files

* chore: fix docker build from incorrect depedency

bookworms latest stable version of libheif-dev is 1.15.1
2024-04-11 22:21:08 +01:00
Simon Ser
d0d0bf21bc Make face detection optional at build-time (#881)
Add a "no_face_detection" build tag to disable face detection
when building. This is useful when installing the face detection
dependencies is undesirable and cuts down build times (e.g. on a
Raspberry Pi).
2024-04-11 22:20:09 +01:00
Konstantin
b2d591bd1b Don't stop scanning album on media fail (#892)
* Don't stop scanning album on media fail

* Update api/scanner/scanner_album.go

accepting suggestion from Jordan

Co-authored-by: Jordan Hellier <13520761+jordy2254@users.noreply.github.com>

---------

Co-authored-by: Konstantin Koval <kkb@ukr.net>
Co-authored-by: Jordan Hellier <13520761+jordy2254@users.noreply.github.com>
2024-03-30 11:04:03 +02:00
Alex Kabakaev
153f37e5fb move mp4 moov atom to the beginning (#883)
Video playback starts faster in browsers.
2024-03-30 09:01:16 +00:00
Yo Sev
9c85663522 Fix invalid UTC offset during datetime parsing (#823) 2024-03-30 07:57:21 +01:00
Andreas
68cc2a0eee reordered cli arguments for ffmpeg to improve speed to generate thumbnails from videos (#917) 2024-03-29 19:35:50 +00:00
Konstantin
a90f30391c Add Ukrainian translation (#875) 2024-03-24 22:42:44 +01:00
john dev
a28e9ba8b7 Prepend missing key CreationDate to createDateKeys 2023-03-21 14:26:03 +01:00
Jakub Tymejczyk
030c9262c6 Fix encoding video thumbnails 2023-03-03 08:51:44 +01:00