Commit Graph

346 Commits

Author SHA1 Message Date
WithoutPants
7db394bbea Date precision (#6359)
* Remove month/year only formats from ParseDateStringAsTime
* Add precision field to Date and handle parsing year/month-only dates
* Add date precision columns for date columns
* Adjust UI to account for fuzzy dates
2025-12-08 09:11:40 +11:00
WithoutPants
0fd7a2ac20 SQL performance improvements (#6378)
* Change queryStruct to use tx.Get instead of queryFunc

Using queryFunc meant that the performance logging was inaccurate due to the query actually being executed during the call to Scan.

* Only add join args if join was added

* Omit joins that are only used for sorting when skipping sorting

Should provide some marginal improvement on systems with a lot of items.

* Make all calls to the database pass context.

This means that long queries can be cancelled by navigating to another page. Previously the query would continue to run, impacting on future queries.
2025-12-08 08:08:31 +11:00
WithoutPants
0bc4faef2a Add support for removing custom field keys (#6362) 2025-12-04 07:28:06 +11:00
WithoutPants
4017c42fe2 Handle modified files where the case of the filename changed on case-insensitive filesystems (#6327)
* Find existing files with case insensitivity if filesystem is case insensitive
* Handle case change in folders
* Optimise to only test file system case sensitivity if the first query found nothing

This limits the overhead to new paths, and adds an extra query for new paths to windows installs
2025-12-02 12:53:37 +11:00
Slick Daddy
ecd9c6ec5b Show O Counter in Studio card (#5982)
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2025-11-25 10:06:36 +11:00
Gykes
957c4fe1b5 Bugfix: Fix empty Aliases Being Created for Studios (#6273)
* Filter out empty alias strings in studio modal create
* Reject empty alias strings in backend
* Remove invalid ValidateAliases call from UpdatePartial

This was calling using the values which are not necessarily the final values.
---------

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2025-11-14 11:49:26 +11:00
Gykes
c99825a453 Feature: Tag StashID support (#6255) 2025-11-13 14:24:09 +11:00
Gykes
f434c1f529 Feature: Support Multiple URLs in Studios (#6223)
* Backend support for studio URLs
* FrontEnd addition
* Support URLs in BulkStudioUpdate
* Update tagger modal for URLs
---------
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2025-11-10 14:34:21 +11:00
EventHoriizon
d5b1046267 Group O-Counter Filter/Sort (#6122) 2025-11-10 11:53:53 +11:00
BigBangClock2
1a9a62eae9 Add sorting by performer age (#6009) 2025-11-10 10:49:40 +11:00
Gykes
53655e51c4 Feature: Filter by Total Scene Duration (#6172) 2025-11-10 10:45:36 +11:00
Gykes
42f76ca34f Filter by Studio (#6155) 2025-11-06 17:26:30 +11:00
WithoutPants
a50a0d4289 Related files/folder filter for scenes/images/galleries (#6158)
* Add related files filter to scene filter
* Add files_filter to gallery filter
* Add files_filter to image filter
* Add gallery related folder filter
2025-11-06 17:25:59 +11:00
WithoutPants
8c4b607454 Add bulk update markers interface (#6210) 2025-11-06 16:01:24 +11:00
WithoutPants
d70ff551d4 Replace "movie" with "group" in scene is missing criterion (#6204)
* Add support for "group" value in scene is-missing filter criterion
* Replace movie with group in scene is missing criterion
2025-10-29 11:12:42 +11:00
WithoutPants
de5a9129b3 Use SafeMove when moving backup database (#6147) 2025-10-17 08:17:15 +11:00
WithoutPants
ce4b86daf5 Fix tag order on details pages (#6143)
* Fix related tag order
* Fix unit tests
2025-10-16 13:15:09 +11:00
WithoutPants
7b182ac04b Vacuum into database directory then move file if backup dir different (#6137)
If the backup directory is not the same directory as the database, then vacuum into the same directory then move it to its destination. This is to prevent issues vacuuming over a network share.
2025-10-15 16:30:06 +11:00
WithoutPants
d3f6301101 Use natural sort for related tags (#6128) 2025-10-13 13:13:45 +11:00
WithoutPants
72c9c436be Fix groups not transferring when merging tags (#6127)
* Add test for group when merging tags
* Fix groups not reallocated when merging tags
2025-10-13 13:13:23 +11:00
WithoutPants
7eff7f02d0 Add findFolder and findFolders queries to graphql schema (#5965)
* Add findFolder and findFolders queries to graphql schema
* Add zip file criterion to file and folder queries
2025-06-26 15:48:29 +10:00
WithoutPants
704041d5e0 Add findFiles and findFile graphql queries (#5941)
* Add findFile and findFiles
* Add parent folder and zip file fields to file graphql types
* Add parent_folder, zip_file fields to Folder graphql type
* Add format to ImageFile type
* Add format filter fields to image/video file filters
2025-06-24 13:05:17 +10:00
damontecres
8d78fd682d Include searching by tag sort name (#5963) 2025-06-24 13:02:19 +10:00
WithoutPants
849a368d3d Fix ordering of tags (#5945) 2025-06-20 16:03:56 +10:00
philMorel
60f1ee2360 feat: Add Performers tab to Group detail page (#5895)
* Feat(#1401): Show all performers from group's scenes on group detail
* Add Groups criterion to performers
---------
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2025-06-11 17:07:09 +10:00
WithoutPants
00f5d0d984 Upgrade gqlgenc (#5901)
* Update gqlgenc
* Fix type error
* Fix package names in config
* Remove override and regenerate
* Update compiler and bump version
2025-06-03 08:55:51 +10:00
WithoutPants
6ed66f3275 Ignore missing scenes when submitting fingerprints (#5799) 2025-04-02 15:48:07 +11:00
its-josh4
db06eae7cb Sort tags by name while scraping or merging scenes (#5752)
* Sort tags by name while scraping scenes
* TagStore.All should sort by sort_name first
* Sort tag by sort name/name in TagIDSelect
---------
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2025-04-02 14:26:14 +11:00
bob123491234
c0d5d1e5a7 Add tag count to studio sort whitelist (#5776) 2025-03-28 12:45:40 +11:00
WithoutPants
daed09e487 Fix various migration issues (#5723)
* Indicate while backing up database
* Close migrate connection to db before optimising
* Don't vacuum post-migration

In most cases is probably not needed and can be an optonal user-initiated step

* Ensure connection close on NewMigrator error
* Perform post-migration using migrator connection

Flush WAL file at end of migration
2025-03-19 08:04:21 +11:00
javstash
6d451d52ea Add sort by scene code option (#5708) 2025-03-17 11:23:51 +11:00
WithoutPants
b8af147a8d Initialise UpdatedAt for stash ids (#5680)
* Initialise imported zero time to epoch time

Fixes null time error after importing stash id without updatedAt set

* Update unit tests
2025-02-26 08:03:35 +11:00
stg-annon
d2daf6c69f Add Sort Name to Tags (#5531)
* override "name" sort with COALESCE
* tag sort_name frontend

adds `data-sort-name` attribute to tag links prioritizes sort_name value but will default to tag name if not present in the same way that COALESCE will prioritize the same values in the same way
* add sort_name filter, update locale per request

* Include sort name in anonymiser
* Add import/export support
---------
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2025-02-11 08:17:21 +11:00
WithoutPants
8c8be22fe4 Performer custom fields (#5487)
* Backend changes
* Show custom field values
* Add custom fields table input
* Add custom field filtering
* Add unit tests
* Include custom fields in import/export
* Anonymise performer custom fields
* Move json.Number handler functions to api
* Handle json.Number conversion in api
2024-12-03 13:49:55 +11:00
dogwithakeyboard
6ad0951878 Scene Marker duration filter and sort (#5472)
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2024-11-29 16:28:10 +11:00
WithoutPants
64fed3553a Lint fixes (#5476)
* Fix lint errors
* Bump lint action version
2024-11-13 09:47:29 +11:00
MinasukiHikimuna
0d40056f8c Markers can have end time (#5311)
* Markers can have end time

Other metadata sources such as ThePornDB and timestamp.trade support end times for markers but Stash did not yet support saving those. This is a first step which only allows end time to be set either via API or via UI. Other aspects of Stash such as video player timeline are not yet updated to take end time into account.

- User can set end time when creating or editing markers in the UI or in the API.
- End time cannot be before start time. This is validated in the backend and for better UX also in the frontend.
- End time is shown in scene details view or markers wall view if present.
- GraphQL API does not require end_seconds.
---------
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2024-11-02 11:55:48 +11:00
Ian McKenzie
180a0fa8dd Add updated_at field to stash_id's (#5259)
* Add updated_at field to stash_id's
* Only set updated at on stash ids when actually updating in identify

---------
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2024-10-31 15:56:16 +11:00
its-josh4
c6bcdd89be Use slices package from the stdlib when possible (#5360)
* Use slices from the stdlib when possible

* Add some unit tests

* More small tweaks + add benchmark func
2024-10-29 11:26:23 +11:00
Arshad
32c48443b5 adding exists check before dropping constraints (#5363)
Co-authored-by: Arshad Khan <arshad@Arshads-MacBook-Air-2.local>
2024-10-15 13:10:47 +11:00
WithoutPants
9b567fa6f4 Exclude null values from image studio id index (#5335) 2024-10-03 11:53:29 +10:00
WithoutPants
c6c3754f02 Fix panic when deleting image with no files (#5328) 2024-10-02 12:19:13 +10:00
WithoutPants
be6431ac13 Fix parent/child tag sort order (#5320) 2024-09-30 17:13:45 +10:00
WithoutPants
7e8c764dc7 Fix migrations not using tx (#5282) 2024-09-22 14:03:54 +10:00
dogwithakeyboard
fd9e4b3ec2 add table alias to group scene sort (#5279) 2024-09-22 13:20:33 +10:00
WithoutPants
476688c84d Database connection pool refactor (#5274)
* Move optimise out of RunAllMigrations
* Separate read and write database connections
* Enforce readonly connection constraint
* Fix migrations not using tx
* #5155 - allow setting cache size from environment
* Document new environment variable
2024-09-20 12:56:26 +10:00
WithoutPants
a17199ba21 Handle symlink zip files (#5249) 2024-09-11 13:58:02 +10:00
WithoutPants
d1c207e40b Rename movies to groups in menu items in 65 post-migration (#5247)
* Only backup config file if needed in 58 migration
* Change movies to groups in menu items in 65 post-migration
2024-09-11 13:39:46 +10:00
WithoutPants
5407596e0d Anonymise missing fields (#5244)
* Anonymise missing fields:
- galleries.photographer
- performers.disambiguation
- gallery_urls

* Anonymise captions and saved filters
2024-09-11 11:50:27 +10:00
WithoutPants
8c2a25b833 Fix gallery scrubber image order (#5222) 2024-09-05 12:59:20 +10:00