Commit Graph

688 Commits

Author SHA1 Message Date
TgSeed
abd76f7e58 Fix/ffprobe unmarshalling error (#2685)
Fix/ffprobe unmarshalling error
2022-06-22 10:49:14 +10:00
CJ
9264c15540 Customize recommendations (#2592)
* refactored common code in recommendation row
* Implement front page options in config
* Allow customisation from front page
* Rename recommendations to front page
* Add generic UI settings
* Support adding premade filters

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2022-06-14 10:34:04 +10:00
WithoutPants
ff724d82cc Don't trim extension for folders when auto-tagging galleries (#2658) 2022-06-08 09:02:11 +10:00
Emilo2
8a1c349976 Fix scraping more than 40 scenes from stash-box (#2638) 2022-06-03 09:37:24 +10:00
InfiniteTF
d68d022893 Add support for submitting stash-box scene updates by draft (#2577) 2022-06-01 14:53:31 +10:00
InfiniteTF
e51083c26d Update stash-box fingerprint query to fully support distance matching (#2509) 2022-06-01 12:59:06 +10:00
DingDongSoLong4
49f579e08e Fix gallery updating (#2611) 2022-06-01 11:58:44 +10:00
cj
c1a096a1a6 Caption support (#2462)
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2022-05-06 11:59:28 +10:00
WithoutPants
ce175dcfc6 Fix audio not in video previews (#2547) 2022-05-05 11:04:01 +10:00
WithoutPants
36aa51a187 Migrate vtt contents when hash changes (#2554) 2022-05-04 09:29:20 +10:00
WithoutPants
21a26fadd8 Generate single preview video for short scenes (#2553) 2022-05-04 09:28:48 +10:00
WithoutPants
e87fd516d6 Fix streaming scenes not able to be deleted (#2549)
* Don't navigate away from scene if delete failed
* Close connection on cancel
2022-05-04 09:27:22 +10:00
WithoutPants
1b91937004 Fix image thumbnail generation (#2524)
* Better logging for thumbnail generation errors
* Reduce verbosity for thumbnail generation
* Provide stdin during thumbnail generation
2022-04-25 15:56:06 +10:00
WithoutPants
aacf07feef Restructure ffmpeg (#2392)
* Refactor transcode generation
* Move phash generation into separate package
* Refactor image thumbnail generation
* Move JSONTime to separate package
* Ffmpeg refactoring
* Refactor live transcoding
* Refactor scene marker preview generation
* Refactor preview generation
* Refactor screenshot generation
* Refactor sprite generation
* Change ffmpeg.IsStreamable to return error
* Move frame rate calculation into ffmpeg
* Refactor file locking
* Refactor title set during scan
* Add missing lockmanager instance
* Return error instead of logging in MatchContainer
2022-04-18 10:50:10 +10:00
InfiniteTF
cdaa191155 Fix submission of scene drafts without performers (#2515) 2022-04-18 10:43:27 +10:00
SmallCoccinelle
401660e6a3 Hoist context, enable errchkjson (#2488)
* Make the script scraper context-aware

Connect the context to the command execution. This means command
execution can be aborted if the context is canceled. The context is
usually bound to user-interaction, i.e., a scraper operation issued
by the user. Hence, it seems correct to abort a command if the user
aborts.

* Enable errchkjson

Some json marshal calls are *safe* in that they can never fail. This is
conditional on the types of the the data being encoded. errchkjson finds
those calls which are unsafe, and also not checked for errors.

Add logging warnings to the place where unsafe encodings might happen.
This can help uncover usage bugs early in stash if they are tripped,
making debugging easier.

While here, keep the checker enabled in the linter to capture future
uses of json marshalling.

* Pass the context for zip file scanning.

* Pass the context in scanning

* Pass context, replace context.TODO()

Where applicable, pass the context down toward the lower functions in
the call stack. Replace uses of context.TODO() with the passed context.

This makes the code more context-aware, and you can rely on aborting
contexts to clean up subsystems to a far greater extent now.

I've left the cases where there is a context in a struct. My gut feeling
is that they have solutions that are nice, but they require more deep
thinking to unveil how to handle it.

* Remove context from task-structs

As a rule, contexts are better passed explicitly to functions than they
are passed implicitly via structs. In the case of tasks, we already
have a valid context in scope when creating the struct, so remove ctx
from the struct and use the scoped context instead.

With this change it is clear that the scanning functions are under a
context, and the task-starting caller has jurisdiction over the context
and its lifetime. A reader of the code don't have to figure out where
the context are coming from anymore.

While here, connect context.TODO() to the newly scoped context in most
of the scan code.

* Remove context from autotag struct too

* Make more context-passing explicit

In all of these cases, there is an applicable context which is close
in the call-tree. Hook up to this context.

* Simplify context passing in manager

The managers context handling generally wants to use an outer context
if applicable. However, the code doesn't pass it explicitly, but stores
it in a struct. Pull out the context from the struct and use it to
explicitly pass it.

At a later point in time, we probably want to handle this by handing
over the job to a different (program-lifetime) context for background
jobs, but this will do for a start.
2022-04-15 11:34:53 +10:00
WithoutPants
8cdf0095cc Handle graphql errors correctly during draft submission (#2485) 2022-04-07 09:32:22 +10:00
WithoutPants
61d9f57ce9 Add ignore autotag flag (#2439)
* Add autoTagIgnored to database schema
* Graphql changes
* UI changes
* Add field to edit performers dialog
* Apply flag to autotag behaviour
2022-04-04 20:03:39 +10:00
SmallCoccinelle
45f700d6ea Support Go 1.18: Upgrade gqlgen to v0.17.2 (#2443)
* Upgrade gqlgen to v0.17.2

This enables builds on Go 1.18. github.com/vektah/gqlparser is upgraded
to the newest version too.

Getting this to work is a bit of a hazzle. I had to first remove
vendoring from the repository, perform the upgrade and then re-introduce
the vendor directory. I think gqlgens analysis went wrong for some
reason on the upgrade. It would seem a clean-room installation fixed it.

* Bump project to 1.18

* Update all packages, address gqlgenc breaking changes

* Let `go mod tidy` handle the go.mod file

* Upgrade linter to 1.45.2

* Introduce v1.45.2 of the linter

The linter now correctly warns on `strings.Title` because it isn't
unicode-aware. Fix this by using the suggested fix from x/text/cases
to produce unicode-aware strings.

The mapping isn't entirely 1-1 as this new approach has a larger iface:
it spans all of unicode rather than just ASCII. It coincides for ASCII
however, so things should be largely the same.

* Ready ourselves for errchkjson and contextcheck.

* Revert dockerfile golang version changes for now

Co-authored-by: Kermie <kermie@isinthe.house>
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2022-04-02 18:08:14 +11:00
WithoutPants
f4a9ea76a1 Fix 10bit vp9 streaming (#2458) 2022-04-02 07:12:07 +11:00
WithoutPants
02ee791796 Fix missing date filter (#2434) 2022-03-29 06:45:46 +11:00
WithoutPants
37632f985b Fix windows ffmpeg concat path (#2425) 2022-03-25 13:50:02 +11:00
WithoutPants
f581687198 Improve performance of gallery and image queries (#2422)
* Revert to use FindByGalleryID in gallery resolver
* Sort by path in FindByGalleryID
* Optimise queries
2022-03-25 12:00:51 +11:00
bnkai
ba41133745 Fix ffmpeg download (#2416) 2022-03-24 11:06:17 +11:00
bnkai
627c1e9c60 Fix plugin go examples (#2396) 2022-03-24 11:03:32 +11:00
WithoutPants
0cd9a0a474 Python path setting (#2409)
* Add python package
* Add python path backend config
* Add python path to system settings page
* Apply python path to script scrapers and plugins
2022-03-24 09:22:41 +11:00
WithoutPants
dd0fa48345 Move tag exclusion to scrape query resolver (#2391) 2022-03-20 19:46:12 +11:00
WithoutPants
e4ad42caf0 Order gallery images by path (#2390) 2022-03-20 17:51:02 +11:00
WithoutPants
6ceb9c73dd Don't generate thumbnails for webp (#2388)
* Don't generate thumbnails for animated webp
* Debug log when writing thumbnail to disk
2022-03-20 17:48:52 +11:00
WithoutPants
f69bd8a94f Restructure go project (#2356)
* Move main to cmd
* Move api to internal
* Move logger and manager to internal
* Move shell hiding code to separate package
* Decouple job from desktop and utils
* Decouple session from config
* Move static into internal
* Decouple config from dlna
* Move desktop to internal
* Move dlna to internal
* Decouple remaining packages from config
* Move config into internal
* Move jsonschema and paths to models
* Make ffmpeg functions private
* Move file utility methods into fsutil package
* Move symwalk into fsutil
* Move single-use util functions into client package
* Move slice functions to separate packages
* Add env var to suppress windowsgui arg
* Move hash functions into separate package
* Move identify to internal
* Move autotag to internal
* Touch UI when generating backend
2022-03-17 11:33:59 +11:00
WithoutPants
9e3d56b22f Fix identify and script scraper bugs (#2375)
* Continue identify if source fails
* Handle empty result set correctly
* Parse null values from scraper script correctly
* Omit warning when json selector value missing
* Return nil when scraped item not found
* Fix graphql validation errors
2022-03-15 09:42:22 +11:00
WithoutPants
e4d6d3b085 Use case-insensitive matching in nameMatchesPath (#2378)
* Use case-insensitive matching in nameMatchesPath

Also ensures that only unique words are returned in getPathWords.
2022-03-11 09:35:48 +11:00
cj
7bd47c651c Read theme color from config file (#2365)
* read theme color from config file
* Update manual page
2022-03-10 08:24:13 +11:00
WithoutPants
d88515abcd Autotag optimisation (#2368)
* Add duration to autotag finish message
* No sorting scene/image/gallery where not specified
* Use an LRU cache for sqlite regexp function
* Compile path separator regex once
* Cache objects with single letter first names
* Move finished auto-tag log
* Add more verbose logging
* Add new changelog
2022-03-09 12:01:56 +11:00
WithoutPants
18665863d6 Remove single unicode character from autotag query (#2363)
* Remove single unicode character from autotag query
* Compile regex once where possible
* Fix CPU profiling
* Only match unicode characters if in path
2022-03-07 13:26:24 +11:00
WithoutPants
d7473f4b38 Distance match phashes on bulk stash-box query (#2355) 2022-03-03 09:38:37 +11:00
WithoutPants
78b7a035d8 Set performer MD5 if name changed in stash-box tag (#2345) 2022-02-28 13:13:13 +11:00
WithoutPants
1ab5be162e Handle unicode characters in autotag (#2336) 2022-02-28 13:12:43 +11:00
WithoutPants
7fd8fc8d55 Remove ChunkDuration warning (#2346)
ChunkDuration is only used in preview generation, and is already validated there.
2022-02-25 11:03:41 +11:00
Releck
22321c2b62 Fix performer tags not applying on scene scrapers (#2339) 2022-02-22 10:18:29 +11:00
WithoutPants
d678283486 Add setting for showing scene scrubber by default (#2325) 2022-02-20 11:08:05 +11:00
DampToast
77acbc42b7 Fix tattoos being put in twitter on batch performer (#2332) 2022-02-19 09:06:20 +11:00
kermieisinthehouse
36ce75c8c6 Fix windows systray icon just hanging out (#2330) 2022-02-18 15:03:41 +11:00
WithoutPants
429fc3869b Clamp generator parameters (#2319) 2022-02-17 09:33:37 +11:00
DampToast
9321388770 Scan now uses exclude regex on gallery zips (#2317)
* Fix zip galleries not using regex excludes
2022-02-16 13:46:35 +11:00
mmavx
3fdc32b432 Add bulk movie update (#2283)
* Add bulk movie edit dialog
* Implement common bulk edit functions

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2022-02-16 13:03:57 +11:00
DampToast
de2724abb9 True case insensitive regex support (#2314) 2022-02-16 11:34:08 +11:00
kermieisinthehouse
4dd0bbc294 Add Several Media Performer Detail Filters, Scene Filters and Sort (#2257)
Co-authored-by: bnkai <48220860+bnkai@users.noreply.github.com>
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2022-02-16 11:11:57 +11:00
kermieisinthehouse
ddf38726a4 Cleanup logspam in identify (#2287) 2022-02-09 18:11:23 -08:00
kermieisinthehouse
21a86bb452 Fix build for renamed armv6 (#2278) 2022-02-03 11:59:00 +11:00