Commit Graph

1311 Commits

Author SHA1 Message Date
marc7s
d1636fb7ea Fix album page being empty for users with overlapping paths (#1159)
* Fix album page being empty for users with overlapping paths, closes #658

* Add test for non root album paths

* Add basic test for non root album path
2025-03-11 18:01:50 +02:00
Kostiantyn
736eb1c051 Bump crypto, fixing its CVE vulnerability (#1177)
* Bump `crypto`, fixing its CWE vulnerability

* Bumping several deps for this week

---------

Co-authored-by: Konstantin Koval
2025-03-11 17:45:33 +02:00
Googol Lee
0dbfcdf4f1 Add coverage of all sub-packages. (#1176) 2025-02-25 22:42:29 +01:00
Kostiantyn
c4d183627d Bump github.com/go-sql-driver/mysql and golang.org/x/crypto to the latest versions (#1174)
Co-authored-by: Konstantin Koval
2025-02-22 21:11:43 +02:00
Googol Lee
06acd165f2 Bump golang from 1.23-bookworm to 1.24-bookworm, as well as gqlgen. (#1172)
* Bump golang from 1.23-bookworm to 1.24-bookworm

Bumps golang from 1.23-bookworm to 1.24-bookworm.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update to use `go tool`, see https://go.dev/doc/go1.24#go-command.

* Update go.mod to go 1.24

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-17 18:45:30 +01:00
Kostiantyn
ba6a4ec07c Bump crypto and sys dependencies to new minor versions (#1170)
Co-authored-by: Konstantin Koval
2025-02-16 11:43:09 +02:00
Kostiantyn
d9627c2aef Bump x/image, x/text, and x/sync to their latest minor versions (#1167)
Co-authored-by: Konstantin Koval
2025-02-13 14:45:02 +02:00
Andreas
6d716a1f1e improved Thumbnail generation performance (#1158)
* improved Thumbnail generation performance

* unified SQL query style

* adjusted query

* changed query to make it more readable
2025-02-02 21:43:12 +02:00
Kostiantyn
b93d48f94e Bump gqlgen and gqlparser to the latest versions (#1166)
Co-authored-by: Konstantin Koval
2025-02-02 20:51:17 +02:00
marc7s
71394e39d6 Fix development mySQL URL pointing to non-existing container (#1164) 2025-02-01 16:57:46 +02:00
Kostiantyn
bdb2aef669 Bump gqlgen, copy, crypto, mint, sys deps to the latest versions in API (#1156)
Co-authored-by: Konstantin Koval
2025-01-19 21:53:50 +02:00
Googol Lee
ce68c25f45 Update apollo config to fix genSchemaTypes (#1154) 2025-01-09 19:51:39 +01:00
Googol Lee
e045e0f7ae Fix sqlite fk configuration and enable all tests for sqlite. Enable detail SQL log in tests (#1151)
* Fix sqlite fk configuration and enable all tests for sqlite.

* Add default severity to golangci-lint config.
2025-01-02 23:02:19 +01:00
Kostiantyn
33ef0981d7 Bump gqlparser to the latest minor version (#1149)
Co-authored-by: Konstantin Koval
2025-01-02 18:31:24 +02:00
Kostiantyn
9835c1949d Bump gqlgen in API to the latest version and regenerate the code (#1147)
Co-authored-by: Konstantin Koval
2024-12-30 17:17:06 +02:00
Googol Lee
f88fcaba69 Use libmagic to identify files type. (#1124)
* Use libmagic to identify file types.

* Fix mime array for database querying.

* go mod tidy

* Fix typo

* Another fix for the scheduled image build workflow for tag case (#1137)

* Try to fix the incorrect tag processing

* more debug code

* try with context=git

* hopefully, final debug

* the final commit with no debug code

---------

Co-authored-by: Konstantin Koval

* Add benchmark.

* rollback workflows.

* Fix AI comments.

* Build image.

* Fix AI comments.

* Fix AI comments.

* Rollback build workflow.

---------

Co-authored-by: Kostiantyn <32730812+kkovaletp@users.noreply.github.com>
2024-12-14 22:07:03 +01:00
Kostiantyn
f1d4d0a048 Bump crypto, go-ffprobe, and sqlite GO dependencies in /api (#1140)
Updated dependencies for improved performance and security:
- golang.org/x/crypto to version v0.31.0
- gopkg.in/vansante/go-ffprobe.v2 to version v2.2.1
- gorm.io/driver/sqlite to version v1.5.7

Co-authored-by: Konstantin Koval
2024-12-14 20:56:44 +02:00
Kostiantyn
bab6ccb538 Bump the anchore/scan-action to the version 6 in the Code analysis workflow (#1141)
Updated the version of the Anchore scan action to improve code analysis capabilities.

Co-authored-by: Konstantin Koval
2024-12-14 19:57:46 +02:00
Kostiantyn
3c53ccc304 Bump several API dependencies to the latest versions (#1138)
* Bump several API dependencies to the latest versions

Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 in /api
Bump github.com/vektah/gqlparser/v2 from 2.5.19 to 2.5.20 in /api
Bump gorm.io/driver/postgres from 1.5.10 to 1.5.11 in /api
Bump golang.org/x/image from 0.22.0 to 0.23.0 in /api
Bump golang.org/x/crypto from 0.29.0 to 0.30.0 in /api
Bump github.com/99designs/gqlgen from 0.17.56 to 0.17.57 in /api

* Regenerate GraphQL code

---------

Co-authored-by: Konstantin Koval
2024-12-06 16:20:48 +02:00
Kostiantyn
8f989df30a Another fix for the scheduled image build workflow for tag case (#1137)
* Try to fix the incorrect tag processing

* more debug code

* try with context=git

* hopefully, final debug

* the final commit with no debug code

---------

Co-authored-by: Konstantin Koval
2024-12-01 18:55:53 +02:00
Kostiantyn
6c020cc1f9 Enhance Codecov integration (#1136)
* Define sub-projects and set coverage threshold for failure in the `codecov.yml`; make both test execution engines to generate also JUnit reports; upload these JUnit reports to Codecov for analysis

* Fix UI Vite config and add more details to the API is-generated-code script

* Add API JUnit report file to `.gitignore`

* Fix the copy issue by mounting the volume

* put the exact report name to the `docker cp` command

* Added `set -euxo pipeline` to the `test_api_coverage.sh` script; try to fix the missing report issue by setting immutable flag and report directoty

* Revert `chattr` and `set` commands, as they cause errors

* debug

* put the filename of the JUnit report to upload

* `set -euxo pipefail` in `scripts/test_api_coverage.sh`

---------

Co-authored-by: Konstantin Koval
2024-11-25 16:25:38 +02:00
Googol Lee
f1b523a27e Include a group of small but real media files for testing. (#1131)
* Move scanner/test_data/* to a stand-alone directory.

* Include real medias.

* Rename testdata to test_data

* Rename test_data/scanner -> test_data/library

* Clean tests to avoid depneding env.

* Rename: scanner/test_data -> scanner/test_media

* Rename: test_data/bin -> test_data/mock_bin

* Fix paths in tests.
2024-11-23 09:02:11 +01:00
Kostiantyn
dde45c29b9 Bump gorm.io/driver/postgres from 1.5.9 to 1.5.10 in /api (#1135)
Co-authored-by: Konstantin Koval
2024-11-22 13:51:15 +02:00
Kostiantyn
54669fb0a8 A new try to fix the building tagged image in the scope of scheduled run (#1133)
* test putting '"' to make the resulting JSON correct

* revert the testing code and move the fixed line to its final location

---------

Co-authored-by: Konstantin Koval
2024-11-21 20:30:05 +02:00
Googol Lee
a9d7b774bd Add log package for better logging level. (#1130)
* Add log package. Update worker with new log package.

* Add init error to worker.

* Init workers when binary launching.

* Add tests to cover different errors.
2024-11-21 10:44:38 +01:00
Kostiantyn
0d69d5584e Refactor auth.go and media.go to remove deprecated dependencies (#1128)
* Refactor `auth.go` and `media.go` to remove deprecated dependencies

* Move the `text` dependency to direct ones in the `go.mod`

---------

Co-authored-by: Konstantin Koval
2024-11-20 21:55:14 +02:00
Googol Lee
772129dbeb Remove continue-on-error: true because it hides errors. (#1129)
* Add test for the workflow.

* Remove continue-on-error.

* Remove always failing test.

* Fix the hidden failure.

* Regenerated.
2024-11-19 19:03:19 +01:00
Googol Lee
6b33e88258 Add build deps of openh264. (#1126) 2024-11-18 15:24:34 +01:00
Googol Lee
07d24b942e Fix imagemagick doesn't have any dep when cross-compiling. (#1125) 2024-11-17 21:46:44 +01:00
Kostiantyn
9d7963151b Bump codecov-action in Tests workflow from 4 to 5 (#1121)
Co-authored-by: Konstantin Koval
2024-11-16 17:29:49 +02:00
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
535a3a744c Fix the config builder job for scheduled docker build workflow (#1120)
* try to fix by removing ''

* add source data for the debug

* Remove debug code

* Move the event logging before the `case`

---------

Co-authored-by: Konstantin Koval
2024-11-15 21:36:00 +02:00
Michał
21bf945aeb Capitalize Polish language label for consistency in language preferences (#1119) 2024-11-12 09:42:13 +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
Kostiantyn
7a59f3445f Fix scheduled docker build for the latest tagged commit (#1116)
* Try to fetch all history

* more debug output

* The final commit

---------

Co-authored-by: Konstantin Koval
2024-11-08 17:32:15 +02:00
Kostiantyn
0fb6636ead Switch all images to the new registry (#1109)
* Switch all images to the new registry

* Update compose files

* Update Readme

* Fix several merge issues.

---------

Co-authored-by: Konstantin Koval
2024-11-03 08:42:37 +02:00
Kostiantyn
0d5225e542 Push dependencies image to the new registry (#1108)
This is the 1st of 2 PRs to migrate to the new Docker registry, where we have more control over the images and are able to manage them.
The new registry is https://hub.docker.com/u/photoview

---------

Co-authored-by: Konstantin Koval 
Co-authored-by: viktorstrate <viktorstrate@gmail.com>
2024-11-02 18:52:46 +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
dependabot[bot]
1a861d9388 Bump anchore/scan-action from 4 to 5 in /.github/workflows (#1095)
Bumps [anchore/scan-action](https://github.com/anchore/scan-action) from 4 to 5.
- [Release notes](https://github.com/anchore/scan-action/releases)
- [Changelog](https://github.com/anchore/scan-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/anchore/scan-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: anchore/scan-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-14 21:12:00 +03: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
4fc9edbd78 Update dep (#1091)
* Update with new deps.

* Update with libheif, removing encoders.
2024-10-12 16:38:38 +02:00
Googol Lee
1165c47efb Cleanup deps. (#1090)
* Clean deps.

* Remove encoders for libheif.
2024-10-12 15:58:14 +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