* Unify scraped types
* Make name fields optional
* Unify single scrape queries
* Change UI to use new interfaces
* Add multi scrape interfaces
* Use images instead of image
* Add script offset / delay to Handy support.
Further work on #1376.
Offsets are added to the current video position, so a positive value leads to earlier motion. (The most common setting.)
This is needed because most script times have a consistent delay when compared to the video. (Delay from the API calls to the server should be handled by the server offset calculation.)
* Rename scriptOffset to funscriptOffset
* Correct localisation keys
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
* Add sorting on image and gallery count to performers
* Make performer table headers translatable
* Add image and gallery count to performers table
* Make sure list table container fits the table
Make the table container minimally as wide as the table. This fixes the
table "overflowing" to the left and right and the left not being
accessible.
* Remove unnecessary truncation in tables
IMO there is no need to truncate the title in the scenes table and the
name in the performers table. This because both tables also contain an
image which means that multiple lines should be possible without really
extending the height of the row. Furthermore both tables contain other
values which might be way longer and also aren't wrapped (like tags and
performers for scenes, and aliases for performers).
* Fix: config race conditions with RWMutex
Added RWMutex to config.Instance which read or write locks
all instances where viper is used.
Refactored checksum manager to only use config and not
viper directly anymore.
All stash viper operations are now "behind" the config.Instance
and thus mutex "protected".
* Fix hierarchical criteria performance issue
Don't apply recursive clause to hierarchical criteria when the depth is
set to 0 (i.e.: no recursion is needed).
This undoes the current performance penalty on for example the studios
page. This as reported in #1519, using a database of 4M images, 30K
scenes and 500 studios. Without this fix loading the studios overview,
with the default of 40 items per page, takes 6 to 7 seconds. With this
fix it only takes 0,07 seconds reverting the performance back to the
pre-hierarchical filtering performance (tested against 508f7b84 which
was the last commit before #1397 was merged).
* Add (not) between modifiers for number criterion
* Extract list filters into dedicated components
Extract the filters from the AddFiltersDialog into custom components.
This allows for further refactorring where components will be bound to
criterions.
* Add placeholders to number and duration criterions
* Add backwards compatibility for saved filters
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
* Add config option for scraper tag exclusion patterns
Add a config option for exclusing tags / tag patterns from the scraper
results.
* Handle tag exclusion patterns during scraping
* Actually implement TagFilter.marker_count
The marker_count filter/criterion as defined in TagFilterType isn't
actually implemented. This adds an implementation for it.
Do note this implementation _might_ have performance issues because of
using OR (in the join). Another implentation would be to remove both
joins and use:
```SQL
COUNT(
SELECT id FROM scene_markers WHERE primary_tag_id = tags.id
UNION
SELECT scene_marker_id FROM scene_markers_tags WHERE tag_id = tags.id
)
```
Note this doesn't require a DISTINCT as UNION already removes any
duplicate records.
* Restore marker count filter and sorting
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
* Change scrapers overview into collapsible per type
* Move scraping configuration to (renamed) scrapers tab
Rename the Scrapers tab to Scraping and move the scraping configuration
to this tab.
* Fix width in database test setup
* Added more filters on resolution field
* added test to verify resolution range is defined for every resolution
* Refactor UI code
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
* Add API to merge tags
Add new API endpoint, `tagsMerge(source, destination)` to merge multiple
tags into a single one. The "sources" must be provided as a list of ids
and the destination as a single id. All usages of the source tags
(scenes, markers (primary and additional), images, galleries and
performers) will be updated to the destination tag, all aliases of the
source tags will be updated to the destination, and the name of the
source will be added as alias to the destination as well.
* Add merge tag UI
* Add unit tests
* Update test mocks
* Update internationalisation
* Add changelog entry
Co-authored-by: gitgiggety <gitgiggety@outlook.com>
* Add basic support for hierarchical filters
Add a new `hierarchicalMultiCriterionHandlerBuilder` filter type which
can / will be used for filtering hierarchical things like the
parent/child relation of the studios.
On the frontend side a new IHierarchicalLabeledIdCriterion criterion
type has been added to accompany this new filter type.
* Refactor movieQueryBuilder to use filterBuilder
Refactor the movieQueryBuilder to use the filterBuilder just as scene,
image and gallery as well.
* Support specifying depth for studios filter
Add an optional depth field to the studios filter for scenes, images,
galleries and movies. When specified that number of included
(grant)children are shown as well. In other words: this adds support for
showing scenes set to child studios when searching on the parent studio.
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
* Add Tag Update/UpdateFull
* Tag alias implementation
* Refactor tag page
* Add aliases in UI
* Include tag aliases in q filter
* Include aliases in tag select
* Add aliases to auto-tagger
* Use aliases in scraper
* Add tag aliases for filename parser
* utils: vtt: add tests
In lieu of documentation.
* utils: vtt: rewrite for correctness and simplicity
Now handles fractional seconds and negative values correctly.
* cleanup: remove dead code
removing some code that does nothing
* cleanup: fixing usage of deprecated gqlgen/graphql api in api/changeset_translator
* cleanup: changing to recommended comparison methods
Changing byte and case-insensitive string comparison to the recommended methods.
* cleanup: making staticcheck happy
* Add funscript route to scenes
Adds a /scene/:id/funscript route which serves a funscript file, if present.
Current convention is that these are files stored with the same path, but with the extension ".funscript".
* Look for funscript during scan
This is stored in the Scene record and used to drive UI changes for funscript support.
Currently, that's limited to a funscript link in the Scene's file info.
* Add filtering and sorting for interactive
* Add Handy connection key to interface config
* Add Handy client and placeholder component.
Uses defucilis/thehandy, but not thehandy-react as I had difficulty integrating the context with the existing components.
Instead, the expensive calculation for the server time offset is put in localStorage for reuse.
A debounce was added when scrubbing the video, as otherwise it spammed the Handy API with updates to the current offset.
* Apply all post processors to performer
Scraping a performer by fragment doesn't correctly work with tags.
When tags are returned to the scraper then all are recognized as new.
This is due to the post process method not being applied while it should
be, as is done when scraping a performer by URL.
* Add tools settings page
* Add tools and move dupe checker
* Make negative number get all
* Show missing phashes
* Add multi-edit button
* Show scene details
* Make config instance-based
* Remove config dependency in paths
* Refactor config init
* Allow startup without database
* Get system status at UI initialise
* Add setup wizard
* Cache and Metadata optional. Database mandatory
* Handle metadata not set during full import/export
* Add links
* Remove config check middleware
* Stash not mandatory
* Panic on missing mandatory config fields
* Redirect setup to main page if setup not required
* Add migration UI
* Remove unused stuff
* Move UI initialisation into App
* Don't create metadata paths on RefreshConfig
* Add folder selector for generated in setup
* Env variable to set and create config file.
Make docker images use a fixed config file.
* Set config file during setup
* Add scraping support for performer tags
* Add performer count to tag cards
* Refactor sqlite test setup
* Add performer tag filtering in gallery and image
* Add bulk update performer
* Add Performers tab to tag page
* Add count filters and sort bys for tags
* Move scene count to icon in performer card #1148
* find correct python executable
For script scrapers using python, both python and python3 are valid depending on the OS and running environment. To save users from having any issues, this change will find the correct executable for them.
Co-authored-by: bnkai <bnkai@users.noreply.github.com>
* Add resolution enum extension
* Add filter builder
* Use filterBuilder for scene query
* Optimise joins
* Add binary operators to scene query
* Use Query for auto-tag
* Expose url for URLReplace in JSON scrapeByURL and scrapeByFragment
* Apply queryURLReplace to xpath scrapers
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
* Add regex string filter criterion
* Use query interface for auto tagging
* Use Query interface for filename parser
* Remove query regex interfaces
* Add selective auto tag
* Use page size 0 as no limit
* extend resolutions
- Simplifies logic
- Adds more options including 540p, 1440p, and resolutions common to VR such as 1920p
- Supports vertical/portrait videos and images
* implement new resolution filters
* Fix integer overflow for scene size on 32bit systems
* Cast to double in sqlite to prevent potential overflow
* Add migration to reset scene sizes and scan logic to repopulate if empty
* Add organized boolean to scene model (#729)
* Add organized button to scene page
* Add flag to galleries and images
* Import/export changes
* Make organized flag not null
* Ignore organized scenes for autotag
Co-authored-by: com1234 <com1234@notarealemail.com>
* Added natural sort for scene and images
* Use natural sort for movie names
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
* Implement parallel scanning and generation, and combined scanning/preview/sprite generation.
* Added UI component for preview/sprite generation during scan, and configurable number of parallel tasks.
* Add v050 changelog entry
* Fix potential image errors
* Fix issue preventing favoriting of tagged performers
* Add error handling in case of network issues
* Show individual search errors
* Unset scene results if query fails
* Don't abort scene submission if scene id isn't found
* Include studios in movie export
* Generalise cards
* Add selection and export for movies
* Refactor gallery card
* Refactor export dialogs
* Add performer selection and export
* Add selection and export for studios
* Add selection and export of tags
* Include movie scenes and gallery images
* Add gql client generation files
* Update dependencies
* Add stash-box client generation to the makefile
* Move scraped scene object matchers to models
* Add stash-box to scrape with dropdown
* Add scrape scene from fingerprint in UI
Fixed annoyingly noisy transcoding progress log messages.
Fixed minor minor issue with directories than are named "blah.mp4" being detected as files to be scanned.
* Added preview generation fallback feature.
When a preview generation fails (often for wmv/avi files), the new code tries with less stricted (no xerror) and more time consuming options (slow+fast seek).
Fix a minor issue when stash downloads ffmpeg/ffprobe, but doesn't re-detect their paths.
* Allow clearing of tag images
* Allow clearing of studio images
* Allow clearing of performer images
* Allow clearing of movie images
* Add filtering for missing images
* api/urlbuilders/movie: Auto format.
* graphql+pkg+ui: Implement scraping movies by URL.
This patch implements the missing required boilerplate for scraping
movies by URL, using performers and scenes as a reference.
Although this patch contains a big chunck of ground work for enabling
scraping movies by fragment, the feature would require additional
changes to be completely implemented and was not tested.
* graphql+pkg+ui: Scrape movie studio.
Extends and corrects the movie model for the ability to store and
dereference studio IDs with received studio string from the scraper.
This was done with Scenes as a reference. For simplicity the duplication
of having `ScrapedMovieStudio` and `ScrapedSceneStudio` was kept, which
should probably be refactored to be the same type in the model in the
future.
* ui/movies: Add movie scrape dialog.
Adds possibility to update existing movie entries with the URL scraper.
For this the MovieScrapeDialog.tsx was implemented with Performers and
Scenes as a reference. In addition DurationUtils needs to be called one
time for converting seconds from the model to the string that is
displayed in the component. This seemed the least intrusive to me as it
kept a ScrapeResult<string> type compatible with ScrapedInputGroupRow.
* Refactor xpath scraper code
* Make post-process a list
* Add map post-process action
* Add fixed xpath values
* Refactor scrapers into cache
* Refactor into mapped config
* Trim test html
* Improve layout and add buttons
* Move functionality into ListFilter
* Make modal style dark
* Convert scene options into edit scenes dialog
* Add delete scenes dialog
* Clear selected ids on delete
* Refetch after update/delete
* Use DeleteScenesDialog in Scene page
* Show scene check boxes in small screens
* Change default multi-set mode to set
* Add reload scraper option to performer details
* Add scraper reload to scene edit page
* Show scene scraper menu when no queryable scrapers
* Add 0.3 changelog
* Change scrape matching (studio, movies, tag, performers) to case insensitive
* * fix collate order
* * make filename parser findbyname calls case insensitive
* * add unit testing for Tags GetFindbyName/s