1
Fork 0
Commit Graph

40 Commits

Author SHA1 Message Date
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
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
viktorstrate 820ae78563
Delete old migrations 2021-01-10 18:29:33 +01:00
sean borg 8d2932dc4d Typo fix 2020-11-22 09:22:01 +00:00
sean borg 11d67c9ae9 Add sidecar path & hash to DB 2020-11-21 11:54:01 +00:00
viktorstrate 534b95edcb Set defaults for new migrations,
to ensure updating photoview is seemless
2020-09-25 19:31:35 +02:00
viktorstrate bbff25973e Fix bug where max_concurrent_tasks for...
scanner queue would be initialized to 0.
2020-09-24 17:52:53 +02:00
viktorstrate d09bb3b99e Fix database compatibility issues with arm (#88)
- Change max key-length of username to 128
- Fix minor syntax error
2020-09-23 13:18:46 +02:00
viktorstrate 9c9807ecc9 Add admin setting to change max concurrent workers 2020-09-21 21:32:30 +02:00
viktorstrate 679dc70340 Prepare for periodic scan intervals
Add setting to database, and to graphql api
2020-09-20 22:19:25 +02:00
viktorstrate 78b415871d Add date information to media
This closes #61
2020-08-12 13:04:41 +02:00
viktorstrate 849f2f25bf Add fileSize to media_url database entries 2020-08-11 22:18:15 +02:00
viktorstrate b52595fe46 Save gps coordinates from exif
This closes #62
2020-08-11 14:46:23 +02:00
viktorstrate 91a6b4de08 Merge database migrations...
...in preparation of v1.0.0. This fixes #60
2020-08-11 14:31:04 +02:00
viktorstrate 3e4b232b1e Update migration to support mariadb 10.5.2 and newer
To support the database configuration used in docker-compose.example.yml
2020-07-15 10:45:33 +02:00
viktorstrate 0e9d37ca77 Add video metadata 2020-07-12 14:17:49 +02:00
viktorstrate 9e5480188b add media_type column to media table in database 2020-07-11 14:05:06 +02:00
viktorstrate df80802cab Huge refactor: rename photo to media
To prepare for video support

Migrate database rename tables and columns:
- photo to media
- photo_url to media_url
- photo_exif to media_exif

- Update api accordingly
2020-07-10 14:26:19 +02:00
viktorstrate b4bdd522dc Make sure path hash is added consistently
The path_hash attribute is added after the path attribute,
to make it consistent with `002_photo.up.sql`
2020-06-30 15:53:29 +02:00
viktorstrate f2bcdf883f Update path hash database migrations 2020-06-30 15:35:45 +02:00
stz184 e70da6bb26 Merge remote-tracking branch 'upstream/master' into use-hash-instead-of-full-path-to-avoid-key-length-maximum 2020-06-24 13:42:43 +03:00
stz184 f88fa33e5f InnoDB has a maximum index length of 767 bytes for tables that use COMPACT or REDUNDANT row format, so for utf8mb3 or utf8mb4 columns, you can index a maximum of 255 or 191 characters, respectively.
That's why I created a new column storing a MD5 hash of the path and made it unique. The MD5 hash has only 32 characters and can be generated natively in MySQL and MariaDB. It helps us to avoid maximum key length and in the same time enforce unique photo and album paths.

- Added path_hash column to photo and album tables
- Added down migration file for 005_utf8_migration (just for consistency)
- Added PathHash field to Album and Photo struct
- album_scanner.go and photo_scanner.goo perform checks by MD5 hash now
2020-06-24 11:43:20 +03:00
viktorstrate b289b25e34 Start on photo favorite 2020-06-17 18:00:58 +02:00
Viktor Strate Kløvedal 8ad1e11015
Sql 4 bytes utf (#17)
Update UTF migration to use 4 bytes unicode
2020-03-13 20:21:49 +01:00
viktorstrate a65a7bc289 Migrate all database tables to use utf8
Before this, photos and albums with special characters,
would result in a scanner error and would not be imported properly.
2020-03-10 19:03:40 +01:00
viktorstrate 2f97dcff0c Improve scanner reliability 2020-02-27 16:26:53 +01:00
viktorstrate b10c607f3a Add exif parsing 2020-02-24 23:30:08 +01:00
viktorstrate a87e9fc56d Add user management to api 2020-02-16 12:22:00 +01:00
viktorstrate a2d0509cad Update scanner to delete removed files 2020-02-12 18:10:52 +01:00
viktorstrate 687b4f4f7f Work on shares 2020-02-11 14:32:35 +01:00
viktorstrate a3a4dda286 Work on share tokens 2020-02-09 21:25:33 +01:00
viktorstrate d50b8034d1 Work on photo serving and processing 2020-02-09 14:21:53 +01:00
viktorstrate 9a8701ecd0 Improve image processing 2020-02-09 12:53:21 +01:00
viktorstrate 517286ff38 Setup initial setup wizard 2020-02-05 16:49:51 +01:00
viktorstrate d81e945b68 Start on image proccessing 2020-02-02 00:29:42 +01:00
viktorstrate a57c111630 Work on scanner 2020-02-01 17:58:45 +01:00
viktorstrate e2049bd6e5 Add sql tables for photos and albums 2020-02-01 14:52:27 +01:00
viktorstrate 9d734af5e2 Implement access token 2020-01-31 18:51:24 +01:00
viktorstrate 0518c0e360 Add user signup 2020-01-31 17:36:48 +01:00
viktorstrate 8a69b1a82c Setup database migration 2020-01-31 15:22:58 +01:00