Commit graph

676 commits

Author SHA1 Message Date
EnameEtavir
9803684535
UI: Add checkbox to scenes List view (#1642) 2021-08-18 12:56:52 +10:00
WithoutPants
680af72dcf
Custom page size and saved zoom level (#1636)
* Allow custom page sizes
* Save zoom level in filters
2021-08-18 12:14:56 +10:00
gitgiggety
fc6cafa15f
Fix hierarchical criteria performance issue (#1643)
* 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).
2021-08-17 13:43:22 +10:00
WithoutPants
0fc5a06332
Add scene queue keyboard shortcuts (#1635) 2021-08-16 14:14:39 +10:00
WithoutPants
b6d15cc077
Make performer scrape button a dropdown (#1634) 2021-08-16 10:16:05 +10:00
gitgiggety
7cb3d05535
Add (not) between modifiers for number criterion (#1559)
* 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>
2021-08-12 10:24:16 +10:00
WithoutPants
c29d8b547d
Overwrite phash during generate if flag set (#1633) 2021-08-11 16:08:10 +10:00
WithoutPants
59c6fe046d
Fix scrape dialog not showing when scraping url (#1632) 2021-08-11 15:54:29 +10:00
gitgiggety
d4d45d5a06
Rebuild Studio page by splitting view and edit (#1629)
* Rebuild Studio page by splitting view and edit
* Fix parent studio id, open studio link in same tab

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2021-08-11 14:44:18 +10:00
Still Hsu
53489106a6
Update zh-tw localization (#1631)
* Fill missing zh-tw fields
* Replace "Merge" verb hard string with i18n impl
2021-08-11 10:26:30 +10:00
kermieisinthehouse
c5e1a3ed72
Fix dropdown menus z-index issue (#1628) 2021-08-11 10:13:17 +10:00
gitgiggety
915533b8c5
Create default config directory during setup (#1623)
* Create default config directory during setup

Instead of creating the config directory during startup, create it
during setup when needed.

Fixes #1616
2021-08-10 14:58:14 +10:00
gitgiggety
59c7dd622b
Fix links and styling of File Info tabs (#1622)
* Refactor HTML of movie and performer details panels

Refactor HTML of the movie and performer details panels so that the
items are contained in a single list (`<dl/>`). This allows using a grid
layout which means that the styling is easier to get right for multiple
form factors, fixing issues where "values" would overlap the "labels"
(for instance on my phone performers "Measurements" almost overlaps the
actual value, while there is a lot of space for the value itself).

This refactor also allows reusing the `TextField` and `URLField`
components as they don't have any styling related classes anymore (i.e.:
the `col-` classes are gone). Which means they can be used in more dense
places, like the SceneFileInfoPanel, as well. As the width of the label
/ value doesn't rely on the viewport size anymore (as happened due to
the `col-xl` usage, but for example the scene sidebar being small, and
16% being to small).

* Rebuild SceneFileInfoPanel

Completely rebuild the SceneFileInfoPanel to make use of the `TextField`
and `URLField` components. Using these components means that the URLs
automatically get `target="_blank" rel="noopener noreferrer"`.
Furhermore this should also improve the styling a bit, as described in
the previous commit.

* Rebuild ImageFileInfoPanel

Completely rebuild the ImageFileInfoPanel to make use of `TextField` and
`URLField` components. Furthermore it should resolve some small styling
issues.

* Rebuild GalleryFileInfoPanel

Rebuild the GalleryFileInfoPanel to make use of `TextField` and
`URLField` components. Using these components means that for example the
URLs automatically get `target="blank" rel="noopener noreferrer"`.

Also adds the url property as 1. at the moment it is nowhere accessible,
and 2. scenes also has it in this panel.

* Truncate links on the file info tabs at latest opportunity

On the File Info tabs links always have the link destination as text for
the link as well. But these texts can be long and without whitespace.
This means that the default applied `word-wrap: break-word` doesn't
really work as URLs (and paths) don't contain spaces that ofter. So
apply `word-break: break-all` instead so that the text will be as long
as possible and just cut off in the middle, instead of only at
whitespace. This thus means that the fully available width will be used
to display the URL.
2021-08-10 14:39:09 +10:00
fnoopv
d31b6841d0
Add Chinese Simplified Translation (#1620) 2021-08-10 14:15:56 +10:00
gitgiggety
dfd55346b2
Scrape tag exclusions (#1617)
* 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
2021-08-10 14:07:01 +10:00
capnrowdy
404eaa32d2
Changes to Default Performer Images (for Accessibility) (#1489)
* Changes to support custom URL paths
* Refactor image resolver code
* Initialise box files at startup
* Update packr

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2021-08-10 13:51:31 +10:00
gitgiggety
9d641c64e3
Actually implement TagFilter.marker_count (#1603)
* 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>
2021-08-04 13:39:24 +10:00
gitgiggety
ac41416cd7
Restructure scraping settings (#1548)
* 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.
2021-08-04 12:32:58 +10:00
WithoutPants
eaa23240f7
Tagger UI improvements (#1605)
* Choose fields to tag
* Use check-circle for success icon
* Maintain fingerprint results
* Show scene details
* Maintain whitespace in TruncatedText
* Use undefine for img when not setting
2021-08-04 09:44:51 +10:00
WithoutPants
f52bfae8ac
Set stash id during performer scrape (#1608) 2021-08-04 09:33:21 +10:00
WithoutPants
7287ad3a05
Remove stripes and add background colour to default performer images (#1609) 2021-08-04 09:01:34 +10:00
WithoutPants
8a7577c9bf
Fix inf values causing marshal error (#1607) 2021-08-03 14:29:57 +10:00
WithoutPants
c7d2ddc5db
Fix unsetting performer gender (#1606)
* Fix unset performer gender
* Fix button group appearing over select menu
2021-08-03 13:13:48 +10:00
Felipe Fernandes Leandro
8f3036b351
Portuguese translation (#1587)
Co-authored-by: kermieisinthehouse <kermie@isinthe.house>
2021-08-03 10:58:46 +10:00
Jekora
ede8cca631
[Feature] Better resolution search (#1568)
* 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>
2021-08-02 13:22:39 +10:00
WithoutPants
723446842f
Split up Tagger component (#1534) 2021-08-02 10:32:23 +10:00
Phasetime
4bdd759dae
German Translation (#1578)
* initial translation pass
* New line at EOF
2021-07-17 19:00:47 +10:00
gitgiggety
a13f43c13b
Always wrap filter conditions in parentheses (#1577)
* Always wrap filter conditions in parentheses

Fixes #1571
2021-07-14 18:29:59 +10:00
thatbrick
1b20fd1ad6
Fix Incorrect loading of images on iOS devices (#1562)
* Removing the height parameter seems to resolve the issue without noticeable differences in functionality
2021-07-13 10:29:47 +10:00
gitgiggety
9591faf3d4
Mobile fixes (#1539)
* Make new tag, gallery and studio pages mobile friendly
* Enable new button on mobile
* Update movies edit HTML to be more in line with scene

Update the code of the MovieEditPanel to be more in sync with the
SceneEditPanel. Changes made are:
 * Use FormUtil.renderLabel instead of manually building
 * Always apply xs=9 breakpoint

This fixes some layout issues on mobile while still looking the same on
tablet and desktop resolution.

* Enable delete button for tags, studios and movies on mobile
* Add changelog

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2021-07-12 20:56:38 +10:00
InfiniteTF
73f99f019c
Show unknown duration when tagging files without a duration (#1535) 2021-06-28 10:37:58 +10:00
WithoutPants
4c838daa12
Add sprite to SceneData fragment (#1533)
* Add sprite to SceneData fragment

Necessary so that TypePolicies object is populated correctly.
2021-06-26 14:25:01 +10:00
WithoutPants
fd3c9153d5
Fix message id issue (#1530) 2021-06-24 10:50:51 +10:00
WithoutPants
0589df51cd
Fix query text field bug (#1528) 2021-06-24 09:00:14 +10:00
WithoutPants
4e08e37d74
Clear scene tagger results on new search (#1526)
* Clear search results when searching in tagger
* Fix oshash messageID
2021-06-23 13:00:58 +10:00
WithoutPants
4e26633abb
UI fixes (#1525)
* Fix scene page styling
* Hide plugins with no tasks on task page
* Update query on URL change
2021-06-23 11:57:03 +10:00
WithoutPants
debf21e6b2
Saved filter bugs (#1524)
* Don't use default filter in VIEW persist state
* Reshuffle randomly sorted saved filters
2021-06-23 11:01:23 +10:00
WithoutPants
2fdf672015
Fix scene galleries panel (#1523) 2021-06-23 10:43:54 +10:00
WithoutPants
4165e7779f
Add various filter criteria (#1505)
* Add various filter criteria
* Add tag name criterion
2021-06-23 09:10:20 +10:00
WithoutPants
5fdfbaa7f1
Query bug fixes (#1510)
* Fix joins being dropped
* Fix missing scene stash_id criterion
* Refactor criterion handlers
* Add tag alias filter
* Remove handleCriterionFunc
2021-06-21 15:48:28 +10:00
WithoutPants
df6e06aaf6
Allow navigation by clicking lightbox image (#1516) 2021-06-21 14:55:31 +10:00
InfiniteTF
3d1b949f4c
Add button to scene page to open scene in external player (#679)
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2021-06-21 14:52:21 +10:00
WithoutPants
8e636545f7
Include server host in plugin input (#1514) 2021-06-21 14:38:44 +10:00
peolic
86bd993b60
fix scrape dialog title (#1511) 2021-06-17 17:57:19 +10:00
WithoutPants
dc7584d77e
Saved filters (#1474)
* Refactor list filter
* Filter/criterion refactor
* Rename option value to type
* Remove None from options
* Add saved filter button
* Integrate default filters
2021-06-16 14:53:32 +10:00
WithoutPants
4fe4da6c01
Merge tags functionality (#1481)
* 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>
2021-06-16 14:33:54 +10:00
WithoutPants
45f4a5ba81
Various UI fixes (#1502)
* Set/unset existing ids when moving to/from set
* Refactor rating banner
* Fix overlapping in multi set
* Prevent UI crash on bad hierarchical input value
2021-06-16 12:17:54 +10:00
Still Hsu
3ae187e6f0
Incorporate i18n into UI elements (#1471)
* Update zh-tw string table (till 975343d2)
* Prepare localization table
* Implement i18n for Performers & Tags
* Add "add" action strings
* Use Lodash merge for deep merging language JSONs

The original implementation does not properly merge language files, causing unexpected localization string fallback behavior.

* Localize pagination strings
* Use Field name value as null id fallback

...otherwise FormattedMessage is gonna throw when the ID is null

* Use localized "Path" string for all instances
* Localize the "Interface" tab under settings
* Localize scene & performer cards
* Rename locale folder for better compatibility with i18n-ally
* Localize majority of the categories and features
2021-06-14 15:48:59 +10:00
WithoutPants
46bbede9a0
Plugin hooks (#1452)
* Refactor session and plugin code
* Add context to job tasks
* Show hooks in plugins page
* Refactor session management
2021-06-11 17:24:58 +10:00
WithoutPants
dde361f9f3
Handle case sensitive file moves (#1427) 2021-06-11 15:25:09 +10:00
bnkai
f1786ad871
Make audio stream optional for preview generation (#1454) 2021-06-11 15:01:32 +10:00
WithoutPants
f843359ba3
Handle auto-tagging where filename has no whitespace in name (#1488) 2021-06-08 10:47:22 +10:00
WithoutPants
099b4ecc56
Fix marker display mode (#1487) 2021-06-07 15:09:06 +10:00
WithoutPants
3e80dffe34
Fix setting scene gallery (#1484) 2021-06-06 15:33:06 +10:00
WithoutPants
c53799c25b
Fix Performer Studio filtering (#1483)
* Fix performer studio filtering

* Fix studio filter hook
2021-06-06 15:05:05 +10:00
WithoutPants
732cc57149
Fix card click selection (#1476)
* Make other cards use generic card
2021-06-04 12:11:17 +10:00
WithoutPants
2469012008
Fix empty sort by causing UI crash (#1480) 2021-06-04 09:49:10 +10:00
bnkai
ad0a9d0707
Fix movies sorting, scene studio editing (#1478)
* Fix movies:sort_by->scenes_count, scene:edit->remove studio
2021-06-04 09:21:17 +10:00
Still Hsu
2ce4d9f0d8
Fix exception when scene preview is unavailable (#1477) 2021-06-03 21:05:43 +10:00
gitgiggety
7164bb28ac
Filter studio hierarchy (#1397)
* 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>
2021-06-03 20:52:19 +10:00
InfiniteTF
c98cc73f33
Fix scene editing of scenes with stash_ids (#1467) 2021-06-03 10:48:58 +10:00
WithoutPants
1bb5de12e3
Use formik for scene edit (#1429)
* Use formik for scene edit panel
* Fix unsetting rating
* Disable save if not dirty
* Movie image fixes
2021-06-02 08:33:38 +10:00
WithoutPants
975343d2e9
Make multiset mode buttons more obvious (#1435) 2021-06-01 08:55:15 +10:00
peolic
eec071f248
Small UI filter fixes (#1456)
* Fix interactive filter name/value
* place `none` filter criterion first and disable it
* display current criterion when editing filter
2021-06-01 08:16:16 +10:00
WithoutPants
3e81d45ae9
UI filter refactor (#1406)
* Refactor Criterion
* Separate filter options from filter
* Rename utils to factory
* Sort sort by options by alphabetical
* Refactor criterion options
* Simplify list filter options
* Refactor i8n
* Simplify ILabeledIdCriterion
2021-05-31 13:46:21 +10:00
peolic
47ecb9f9b1
Fix scraped tag creation (#1436) 2021-05-28 09:00:13 +10:00
WithoutPants
c70faa2a53
Tag aliases (#1412)
* 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
2021-05-26 14:36:05 +10:00
WithoutPants
9b57fbbf50
Embedded javascript plugins (#1393) 2021-05-26 14:17:53 +10:00
peolic
cc5ec650ae
Fix scraper date parser failing when parsing time (#1431)
* Don't mutate the original scraped date

`time.Parse` is case-sensitive for some values, `AM/pm` in particular
2021-05-26 07:29:51 +10:00
WithoutPants
65baf46c40
Revert scrubber debounce (#1428) 2021-05-25 14:57:02 +10:00
peolic
3d93f7f0fe
Fix invalid scene queue generated link (#1425)
* Escape quotes in criterion label

JSON encoding and slicing off the encompassing JSON-string quotes seems like a safer option

* Wrap criterion parse in try/catch

to prevent the page from crashing
2021-05-25 11:18:09 +10:00
peolic
d326d4380f
Add CreatedAt & UpdatedAt to all object resolvers (#1421)
* add `CreatedAt` & `UpdatedAt` to all objects
* add `FileModTime` to supported objects
* Use `GQL.SlimTagDataFragment` over `GQL.Tag`
2021-05-25 10:56:34 +10:00
peolic
4bad988373
Remove performer "is missing scenes" filter (#1414) 2021-05-25 10:45:26 +10:00
EnameEtavir
fad558a618
Fix: login form label references (#1416)
Fixes the login form label references for Username and Password by adding
the missing id attributes to each of the input fields respectively
to which the labels where referring to.
2021-05-25 08:26:21 +10:00
EnameEtavir
c08e0c0f60
add REACT_APP_PLATFORM_PORT for development (#1411)
* add REACT_APP_PLATFORM_PORT for development

Add development REACT_APP_PLATFORM_PORT env variable
to createClient.getPlatformURL so that you can more easily
run more stash platform services at once during development.

If non is given, it falls back to standard port "9999".
2021-05-24 15:44:40 +10:00
WithoutPants
0e01374537
Job queueing (#1379) 2021-05-24 14:24:18 +10:00
UnluckyChemical765
547f6d79ad
Add Handy / Funscript support (#1377)
* 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.
2021-05-24 13:34:28 +10:00
WithoutPants
33999d3e93
Studio Performers page (#1405)
* Refactor performer filter
* Add performer studio criterion
* Add Studio Performers page
2021-05-22 17:07:03 +10:00
gitgiggety
586d146fdb
Apply all post processors to performer (#1387)
* 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.
2021-05-21 12:32:28 +10:00
bnkai
ab24d0f625
Add subtractDays pp action to scraper (#1399) 2021-05-21 12:20:12 +10:00
WithoutPants
76019af3e5
DLNA (#1364) 2021-05-20 16:58:43 +10:00
WithoutPants
0f579076b6
Clamp page to max pages (#1403) 2021-05-20 07:28:42 +10:00
Still Hsu
81058a7807
i18n: Add zh-TW localization strings (#1375) 2021-05-18 13:24:40 +10:00
WithoutPants
22a2fc3177
Make ffmpeg download location more portable (#1384)
* Download ffmpeg to config path
* Add setup message for ffmpeg download
* Handle missing ffmpeg in tasks
2021-05-18 09:14:25 +10:00
WithoutPants
3df7ee06eb
Shortcut scan walk for excluded folders (#1382)
* Shortcut scan walk for excluded folders
* Add note to manual
* Add changelog entry
2021-05-17 15:46:00 +10:00
InfiniteTF
ce20df343a
Add option to remove studio stash ids (#1378)
* Add option to remove studio stash ids
* Add v0.8 changelog
2021-05-17 14:58:25 +10:00
WithoutPants
e0623eb302
Fix initial setup issue issues (#1380)
* Refactor initial setup behaviour
* Adjust wizard
2021-05-13 22:15:21 +10:00
InfiniteTF
5a37e6cf52
Add search modal for stash-box performer scraper (#1373)
* Cache tagger fingerprint lookups between renders
* Show search modal for stash-box performer scraper
2021-05-10 09:33:08 +10:00
WithoutPants
3f97b3a1cb
Remove unnecessary graphql fields (#1370)
* Remove unnecessary graphql fields
* Optimise joined queries
* Tag resolver query optimisation
2021-05-09 19:25:57 +10:00
InfiniteTF
81cf3d3337
Fix sorting of tagger fingerprint matches (#1369) 2021-05-07 13:00:29 +10:00
InfiniteTF
31981d4116
Add in-memory screenshot generation for sprites and phash (#1316) 2021-05-05 13:22:05 +10:00
WithoutPants
08c294414d
Fix initial plugins/scrapers paths when initialising in home directory (#1358)
* Only set default values once config file present
* Fix configLocation presentation when using home
2021-05-04 07:42:33 +10:00
bnkai
2ab42e9cd3
Populate image/gallery title during scan (#1359) 2021-05-03 14:21:51 +10:00
InfiniteTF
896c3874af
Stash-Box Performer Tagger (#1277)
* Add bulk stash-box performer task
* Add stash-box performer scraper to scrape with menu
2021-05-03 14:21:20 +10:00
WithoutPants
a3609079bb
Autotag support for images and galleries (#1345)
* Add compound queries for images and galleries
* Implement image and gallery auto tagging
2021-05-03 13:09:46 +10:00
WithoutPants
d7a04ced00
Revert always show preview videos on small devices (#1340) 2021-05-03 08:23:19 +10:00
InfiniteTF
4a04dfe4a2
Fix scene tagger bugs (#1357) 2021-04-30 14:55:18 +10:00
bnkai
597576f5e6
Get distinct values from scraper (#1338)
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2021-04-29 11:38:55 +10:00
julien0221
502d99de1b
Added new filters (date and title) to galleries (#1344)
* Added new filters (date and title) to galleries
* Added image_count on filter for galleries
2021-04-29 11:31:51 +10:00
julien0221
4d13e8d7f7
Fixed rating filter on studios (#1342) 2021-04-29 11:20:59 +10:00