1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
Commit Graph

1109 Commits

Author SHA1 Message Date
Patrik J. Braun
0b7b7a7e48
Merge pull request #874 from grasdk/feature/timestamp-fix
Feature/timestamp fix
2024-04-04 22:51:38 +02:00
Patrik J. Braun
6e85dc4967
Merge pull request #870 from grasdk/master
Feature/caption and title (#14)
2024-04-04 22:49:26 +02:00
gras
a0c22fd481 more intuitive "x months ago"-search 2024-04-04 18:58:34 +02:00
gras
6019932d71 another linting fix 2024-04-03 23:00:58 +02:00
gras
8805fee063 linting fix 2024-04-03 22:56:21 +02:00
gras
7411750ffd Added a test for offset-fix and found another bug - also fixed 2024-04-03 22:50:49 +02:00
gras
f8021348db fix for the fix - forgot to run tests 2024-04-03 21:34:41 +02:00
gras
9ebd658276 Correction for Utils.timestampToMS 2024-04-03 21:20:54 +02:00
gras
7339fe676b This reverts commit 75d81d42bd. 2024-04-03 21:17:07 +02:00
gras
7f68c827d8 This reverts commit 84928e6371. 2024-04-03 21:16:59 +02:00
gras
3b55d72e0f This reverts commit 1e50f1b2e5. 2024-04-03 21:16:55 +02:00
gras
cb433fe83b This reverts commit fcc123bb1b. 2024-04-03 21:16:29 +02:00
gras
fcc123bb1b reverted search manager tests 2024-04-01 18:53:32 +02:00
gras
d628c816da Reading camera metadata from multiple sources 2024-04-01 00:09:53 +02:00
gras
1e50f1b2e5 linting error fix 2024-03-31 19:20:07 +02:00
gras
84928e6371 Change how months are subtracted in SearchManager 2024-03-31 19:15:59 +02:00
grasdk
75d81d42bd
Feature/caption and title (#14)
* reading caption and title from several tags with several tests added
minor bugfix for date conversion to MS
optimization: break sidecar loop, when first sidecar is found
2024-03-31 14:57:20 +02:00
sarayourfriend
409af3898b
Narrow LoggerArgs types and fix bad revert 2024-03-31 09:45:16 +11:00
sarayourfriend
2b26b3744b
Revert "Remove duplicative logging"
This reverts commit 25fb0ddb531a29dcc0fcefeedb986a1451d669b6.
2024-03-31 09:45:16 +11:00
sarayourfriend
fcdb2f2938
Revert "Always use Logger class and try to log once per event"
This reverts commit a57a717717a676555b4e28d5746828477c2f9811.
2024-03-31 09:45:16 +11:00
sarayourfriend
b0c2f8da04
Always use Logger class and try to log once per event
This unifies logging across the backend to always use the Logger class,
always only logs to stdout (rather than an inconsistent mix of stdout
and stderr, depending on whether console.error was used), and removes
logging where two log events happened for the same message

For example, this pattern:

```js
Logger.error("Whoops, something went wrong:")
console.error(err)
```

That causes two separate log events, and depending on the log transport
used, could cause relevant log messages to get split across multiple
events and therefore be harder (usually just more tedious) to connect
and debug in production environments.
2024-03-31 09:45:16 +11:00
sarayourfriend
ba6e7c03ec
Always use Logger class and try to log once per event
This unifies logging across the backend to always use the Logger class,
always only logs to stdout (rather than an inconsistent mix of stdout
and stderr, depending on whether console.error was used), and removes
logging where two log events happened for the same message

For example, this pattern:

```js
Logger.error("Whoops, something went wrong:")
console.error(err)
```

That causes two separate log events, and depending on the log transport
used, could cause relevant log messages to get split across multiple
events and therefore be harder (usually just more tedious) to connect
and debug in production environments.
2024-03-31 09:45:16 +11:00
sarayourfriend
3be8f1b194
Remove duplicative logging
These log calls either duplicated the generic error renderer logging or neighbouring log calls
2024-03-31 09:45:16 +11:00
sarayourfriend
5c8e01c034
Configure log levels for specific error types 2024-03-31 09:45:16 +11:00
sarayourfriend
fae2980692
Remove dead code 2024-03-31 09:45:16 +11:00
sarayourfriend
7cf7febc5c
Remove duplicative logFN type 2024-03-31 09:45:16 +11:00
Patrik J. Braun
086bc47a01
Merge pull request #868 from grasdk/master
Metadata mapping and consolidation
2024-03-30 22:12:29 +01:00
gras
78fbc942b9 mediaentity rating back to unsigned 2024-03-30 22:04:07 +01:00
gras
9aab44b7af Removed 0 as a rating, since it means unrated. 2024-03-30 21:23:10 +01:00
gras
b071b6daae xmp-rating valid values now 1-5. 0 means "unrated" and the attribute does not exist with value 0 2024-03-30 21:07:41 +01:00
gras
77982e6c10 changed database to be able to contain rating -1 2024-03-30 15:59:38 +01:00
gras
9e7acc46c1 gps coordinate undefined check + rating update 2024-03-30 15:31:16 +01:00
gras
a8b00d549b changed orientation to const 2024-03-30 14:13:47 +01:00
grasdk
1514662b8d
Feature/metadata sidecar reading cleanup (#13)
* Removed the SideCar Type to make reading sidecar data just as generic as reading the embedded exif data

* Moved metadata-mapping into separate function to prepare for reuse

* Most sidecar metadata is now read with the same function as embedded metadata (for photos). Fixed a bug with rating: 0 being ignored

* added new test for special chars and timezone

* merge incoming changes

* xmp rating fix - 0 is a value. prep for xmp timestamp handling

* refactored mapping of metadata into smaller functions

* consolidated GPS coordinate mapping

* simplification of sidecar date reading logic

* Moved date mapping code into one function - fixed testdata - did not yet resolve offset bug

* CreationDateOffset is now mapped from Sidecar timestamps. Tests updated accordingly.


Total: changed sidecar reading for video to shared reader and fixed tests accordingly (more data is read now)
2024-03-30 13:58:06 +01:00
sarayourfriend
c44110d4a6
Trim extensions when sorting filenames 2024-03-29 16:09:23 +11:00
Patrik J. Braun
663b5bff95 remove debug logging 2024-03-26 00:30:15 +01:00
Patrik J. Braun
4176123865 test logging.. 2024-03-26 00:16:29 +01:00
Patrik J. Braun
fc20126f0e test logging.. 2024-03-26 00:15:58 +01:00
Patrik J. Braun
6b3a208794 Improving integration tests. 2024-03-25 23:10:10 +01:00
Patrik J. Braun
ed0ea40758 Improving integration tests. 2024-03-25 22:51:27 +01:00
Patrik J. Braun
78b72e2528 Fix integration tests port race condition 2024-03-25 22:21:18 +01:00
Patrik J. Braun
7f65dfd1b2 Check if folder exists before listing it. 2024-03-25 21:47:05 +01:00
Patrik J. Braun
743d29b208 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	src/backend/model/extension/ExtensionConfigWrapper.ts
2024-03-25 21:39:41 +01:00
Patrik J. Braun
d4d8dcfcdb Fix extension loading #784, #847, fixes #855 2024-03-25 21:38:09 +01:00
Martin Kampas
8517430a1b Deal with rating missing in XMP sidecars
Avoid getting Rating of 0 when rating metadata is not included in a
sidecar.
2024-03-23 12:44:30 +01:00
Martin Kampas
1d1df01a68 Read GPS coordinates from XMP sidecar too 2024-03-22 15:44:22 +01:00
Patrik J. Braun
40e8147883
Merge pull request #855 from mblythe86/issue847
Fix extension configuration loading issue
2024-03-20 08:20:29 +01:00
Matthew Blythe
e89af221c9 Fix extension configuration loading issue 2024-03-19 02:00:42 -06:00
grasdk
35839ef732 test-fixing 2024-03-14 10:41:41 +01:00
Martin Kampas
da0b7d8e21 Allow for "xap" ns prefix instead of "xmp" 2024-03-13 20:03:26 +01:00
Martin Kampas
03e0822181 Improve on reading dates from XMP sidecars 2024-03-13 20:03:26 +01:00
Martin Kampas
98a78e34fe Move utilities for parsing time stamps to Utils
These will be needed from the loadVideoMetadata as well.
2024-03-13 20:01:47 +01:00
Martin Kampas
6173350a69 Fix errors reading properties of undefined 2024-03-13 19:29:13 +01:00
grasdk
390e24a2c4 Added read of CreationDate to sidecar and fixed tests 2024-03-11 23:47:44 +01:00
kagahd
f05ee7a867
Merge branch 'master' into issue838
# Conflicts:
#	src/backend/model/fileaccess/MetadataLoader.ts
2024-03-11 08:35:14 +01:00
Patrik J. Braun
f551509fee Messenger handler should override when adding #784 2024-03-09 01:16:38 +01:00
grasdk
219cac5219 DataStructureVersion bump to trigger database rebuild 2024-03-08 16:07:23 +01:00
grasdk
e21e67cfc7
Feature/location info (#9)
* Show comma-separated city, state and country in infobox and in gallery mode. All of the values that are non-empty will be shown.

* methodcall to isPhoto

* Unit test and bugfix for CreationDate (#8)

* fixed the DiskManagerWorker test

* s (#10)

* Unit test and bugfix for CreationDate (#8)

* fixed the DiskManagerWorker test

---------

Co-authored-by: Patrik J. Braun <bpatrik@users.noreply.github.com>

* s (#11)

* Unit test and bugfix for CreationDate (#8)

* fixed the DiskManagerWorker test

---------

Co-authored-by: Patrik J. Braun <bpatrik@users.noreply.github.com>

* 9ij (#12)

* Unit test and bugfix for CreationDate (#8)

* fixed the DiskManagerWorker test

---------

Co-authored-by: Patrik J. Braun <bpatrik@users.noreply.github.com>

---------

Co-authored-by: Patrik J. Braun <bpatrik@users.noreply.github.com>
2024-03-08 00:01:23 +01:00
grasdk
2af6115f2a
Unit test and bugfix for CreationDate (#8) 2024-03-07 09:29:44 +01:00
Patrik J. Braun
3811fc3c99 Add missing $localize #784 2024-03-06 22:43:52 +01:00
Patrik J. Braun
5d5be0604e
Merge pull request #845 from grasdk/feature/timestamp_rework_test_fix
fix leap year searching and tests. small metadatabuffer size optimization
2024-03-06 22:29:06 +01:00
Patrik J. Braun
eb36707062
Merge pull request #844 from mblythe86/ext_excludeDir
Add excludeDir to extension interface
2024-03-06 22:11:40 +01:00
grasdk
af4e915749 Changed CRLF back to LF 2024-03-06 16:54:30 +01:00
grasdk
d528760b26
Merge branch 'bpatrik:master' into feature/timestamp_rework_test_fix 2024-03-06 06:24:19 +01:00
grasdk
c4cc99bcc7 Removed Unnecessary semicolon 2024-03-06 06:11:39 +01:00
grasdk
f11a133f43 fix leap year searching and tests. small metadatabuffer size optimization. 2024-03-06 00:40:18 +01:00
Matthew Blythe
5852dac1ad Add excludeDir to extension interface
Without this, the mechanism to exclude a directory from indexing is a
bit strange.  I had to use the `scanDirectory.after` hook, then remove
elements from the `output.directories` array.

In order to make the extension hook a bit more developer-friendly,
I also changed the arguments to the `excludeDir` function to be a
dictionary instead of just an array (or tuple?) of strings.
2024-03-05 02:43:39 -07:00
kagahd
0f0a66c05d
Merge branch 'master' into issue838
# Conflicts:
#	src/backend/model/fileaccess/MetadataLoader.ts
#	test/backend/unit/model/threading/MetaDataLoader.spec.ts
2024-03-04 11:55:04 +01:00
Patrik J. Braun
4352ff89b7
Merge pull request #832 from bpatrik/feature/extension-settings
Feature/extension settings #784
2024-03-03 15:50:52 +01:00
Matthew Blythe
745e486e1c Add logging elision
Allow for anonymous functions in logging calls.
The function is only called if the message is logged.
(e.g. if the verbosity is turned up high enough.)
This allows for expensive operations to be avoided
in cases where the logging won't happen.

The idea is that this provides a performance benefit.
I don't know how "expensive" an operation must be
to actually realize a performance benefit, though.

I added an example in server.ts...
It's probably "expensive" to dump the configuration
to JSON, then stringify that JSON for logging.
2024-03-03 01:19:21 -07:00
Patrik J. Braun
1502e80150 Add basic extension UI #784 2024-03-02 22:36:06 +01:00
Patrik J. Braun
9172f89e78 Add basic extension UI #784 2024-03-02 22:36:06 +01:00
Patrik J. Braun
8a8fc57c67 Refactor extension settings 2024-03-02 22:36:06 +01:00
Patrik J. Braun
7f3056158a
Merge pull request #836 from veroxzik/feature/lightbox-mousewheel-improvements
Lightbox: fix mouse wheel behavior and add horizontal scroll feature. fixes #835
2024-03-02 22:24:32 +01:00
kagahd
3ee030d8ba
fix bug 2 of #838 : If the xmp file does not include the file extension of the tagged file, no keywords and ratings are shown in PiGallery's frontend. 2024-02-26 21:38:25 +01:00
kagahd
75e4ed70b6
fix bug 1 of #838 : If the tagged video contains only one keyword, the keyword is shown in PiGallery2 character by character, each prefixed by a hash sign, all separated by comma and space 2024-02-26 21:37:28 +01:00
veroxzik
eed4f0b6fa
Fix zoom behavior and add horizontal scrolling. 2024-02-22 19:18:31 -05:00
grasdk
e0d9bdf2b2
Feature/timestamp use2 (#7)
* effective storage of offset

* added comments to searchmanager.ts fixed linting error in utils
2024-02-21 23:38:07 +01:00
grasdk
6009ac649f
effective storage of offset (#6) 2024-02-21 23:06:24 +01:00
grasdk
e1e70fc13c Reverted GalleryRouter, did not change it 2024-02-16 19:53:58 +01:00
grasdk
5e94220d6d
Use of offset value in the UI (#5)
Added recognition of the offset value in the UI. It will be displayed if available.

Caveat: Search will not take offset into account. A new year's picture taken in Sydney the 1st of January 2019 00:15:00 GMT+11, is technically taken in 31st of December 2018 in UTC. Therefore this picture won't show of in seaches where the after: parameter is set to 1st of january 2019.

This is both correct and wrong at the same time.

UTC-wise it is correct, local time it is not correct. I guess most people would find local time most untuitive, so there is room for improvement of the search. :)
2024-02-16 19:17:31 +01:00
gras
25acd6f30d Added two more metadata dates to fall back to, instead of file date. This fixes the png-test 2024-02-11 22:35:19 +01:00
gras
a2c9208706 Fixed serious error with offset calculation. Fixed bad test-data. 2024-02-11 21:41:42 +01:00
gras
a6035f5b65 fixed style errors 2024-02-11 17:08:21 +01:00
grasdk
b2be0a9763
consolidate exif parsing libraries - rework of timestamps (#4)
* exifr is used for most tags now

* New timestamp handling, removed exif-parser, date supported for png

* Removed offset from testhelper. It's optional

* explanations

* Feature/timestamps (#3)

* preparing for further timestamp test

* Added more test and fixed offset calculation bug

* Revered old dimension test, added new timestamp tests, some bug fixes

* Renamed png-test because faces overrule keywords
2024-02-11 15:55:26 +01:00
Patrik J. Braun
8c3bd650ad
Merge pull request #826 from grasdk/master
Fix for issue #794 (bugfix)
2024-02-08 23:12:21 +01:00
Steven Bower
da9c79a533
Fix video not loading #808
Route collision with thumbnail path and video path. Results in videos not loading properly.
2024-02-06 09:01:35 +08:00
grasdk
1b579269ce
Feature/specialchars (#2)
* switched from ExifReader to exifr and updated tests to fix issue 794
2024-02-05 22:35:25 +01:00
Patrik J. Braun
649e7a9a7e Indicating if slideshow is running in query params #809 2024-01-07 16:56:05 +01:00
Patrik J. Braun
acccde3054 Fix lightbox loading flickering #806 2024-01-06 12:48:51 +01:00
Patrik J. Braun
4a2959edaf Fixing solo job running 2024-01-03 11:34:00 +01:00
Patrik J. Braun
dccd9c30e1 Add confirming popup for jobs #764 2024-01-03 11:24:35 +01:00
Patrik J. Braun
13e828d210 Merge thumbnail and photo preview (generated photo) handling #806 2024-01-03 11:06:19 +01:00
Patrik J. Braun
0395fa87ff Remove rating support for lightbox texts for now as the current architecture does not support it #801 2023-12-28 16:41:48 +01:00
Patrik J. Braun
e68fbbbe44 Create customizable lightbox text. fixes #801 2023-12-26 00:36:50 +01:00
grasdk
0a13d6677c
Danish translation (#1)
* Ready to translate
* Added Danish translation and missing english translation units
2023-12-14 23:15:49 +01:00
Patrik J. Braun
3489f1d55a
Merge pull request #798 from nk9/image-titles-2
[#760] Add image titles and captions to the info panel.
2023-12-13 09:53:09 +01:00
Patrik J. Braun
9502546e29
Merge pull request #795 from grahamalderson/xmp-sidecar-support
Refactor sidecar loading
2023-12-13 09:50:24 +01:00
Nick Kocharhook
e7c0906cb2 [#760] Add image titles and captions to the info panel. 2023-12-06 16:25:02 +00:00
Patrik J. Braun
1eaad445b1
Merge pull request #796 from marcusfey/master
Tiny fix of error in German translation
2023-12-05 10:51:37 +01:00