Commit Graph

60 Commits

Author SHA1 Message Date
WithoutPants 440c261f5b
Developer option: extra blob paths (#4566)
* Allow additional read-only blob paths
* Add developer option to add more blob sources
* Add makefile targets to start and remove build container
* Documentation
2024-02-16 12:39:45 +11:00
DingDongSoLong4 43a9df8621
Fix CI pip externally-managed-environment error (#4360)
* Add missing Makefile PHONY target
* Add Dockerfile-CUDA vim modeline
* Fix CI pip externally-managed-environment error
2023-12-14 13:29:44 +11:00
DingDongSoLong4 b78771dbcd
Manager refactor, part 1 (#4298)
* Move BackupDatabase and AnonymiseDatabase to internal/manager
* Rename config.Instance to config.Config
* Rename FFMPEG
* Rework manager and initialization process
* Fix Makefile
* Tweak phasher
* Fix config races
* Fix setup error not clearing
2023-11-28 13:56:46 +11:00
DingDongSoLong4 65b416a2d9
Fix FreeBSD cross-compilation (#4251)
* Cleanup compiler container
* Fix FreeBSD cross-compilation
* Bump compiler version
---------
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2023-11-20 11:26:57 +11:00
DingDongSoLong4 4dd4c3c658
Improved/fixed macOS support (#4153)
* Fix macOS notifications
* Change CFBundleIdentifier to match domain
* Distribute Stash.app
* Also build universal phasher binary
* Fix binary name in check_version.go
* Expose GOOS, working dir and home dir in systemStatus endpoint
* Disable setup in working directory when running Stash.app
* More Makefile improvements, remove unused scripts
* Improve READMEs and documentation
2023-11-19 10:36:13 +11:00
DingDongSoLong4 d96558704a
Improve random sorting algorithm (#4246) 2023-11-02 16:13:56 +11:00
WithoutPants 9d5cc54cdc
Fix armv7 illegal instruction
Testing indicated that the arm-linux-gnueabihf-gcc compiler was emitting a binary that used thumb2 directives that are illegal on raspberry pi. Using the arm-linux-gnueabi-gcc compiler appears to fix the issue. Added march directive to target v7.
2023-09-27 09:26:58 +10:00
DingDongSoLong4 c364346a59
Model refactor (#3915)
* Add mockery config file
* Move basic file/folder structs to models
* Fix hack due to import loop
* Move file interfaces to models
* Move folder interfaces to models
* Move scene interfaces to models
* Move scene marker interfaces to models
* Move image interfaces to models
* Move gallery interfaces to models
* Move gallery chapter interfaces to models
* Move studio interfaces to models
* Move movie interfaces to models
* Move performer interfaces to models
* Move tag interfaces to models
* Move autotag interfaces to models
* Regenerate mocks
2023-09-01 10:39:29 +10:00
DingDongSoLong4 96f222997a
Improve Makefile (#3901)
* Improve Makefile
* Make ui targets consistent
---------
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2023-07-12 10:05:35 +10:00
Csaba Maulis 0c0ba19a23
Add `-v/--version` flag to print version string (#3883)
* Add `-v/--version` flag to print version string

- Created a new flag `-v/--version` in the command-line interface to display the version number and exit.
- Moved all version-related functions inside the config package to the new file `manager/config/version.go` to avoid circular dependencies.
- Added a new `GetVersionString()` function to generate a formatted version string.
- Updated references to the moved version functions.
- Updated references in the `Makefile`.

* Move version embeds to build package

* Remove githash var

---------

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2023-07-11 15:54:42 +10:00
A Ghoul Coder 969af2ab69
add phasher (#3864)
* add phasher

A simple `phasher` program that accepts a video file as a command line
argument and calculates and prints its PHASH.

The goal of this separate executable is to have a simple way to
calculate phashes that doesn't depend on a full stash instance so that
third-party systems and tools can independently generate PHASHes which
can be used for interacting with stash and stash-box APIs and data.

Currently `phasher` is built in the default make target along with
`stash` by simply running `make`.
Cross-platform targets have not been considered.

Concurrency is intentionally not implemented because it is simpler to
use [GNU Parallel](https://www.gnu.org/software/parallel/).
For example:
```
parallel phasher {} ::: *.mp4
```

* standard dir structure for phasher and separate make target

The make target still needs to be integrated into the rest of the
Makefile so it can be built as part of normal releases.

* phasher: basic usage output and quiet option
* phasher: allow and process multiple command line arguments
* phasher: camelCase identifiers
* phasher: initialize ffmpeg and ffprobe only once
2023-07-11 15:53:53 +10:00
DingDongSoLong4 0268565099
Makefile cleanup (#3876) 2023-07-11 11:36:57 +10:00
DingDongSoLong4 87abe8c38c
Add opt-in UI sourcemaps (#3603)
* Add opt-in UI sourcemap support
* Cleanup Makefile
* Add STASH_NOLEGACY
2023-04-19 11:59:56 +10:00
NodudeWasTaken 0c1b02380e
Simple hardware encoding (#3419)
* HW Accel
* CUDA Docker build and adjust the NVENC encoder
* Removed NVENC preset

Using legacy presets is removed in SDK 12 and deprecated since SDK 10.
This commit removed the preset to allow ffmpeg to select the default one.

---------

Co-authored-by: Nodude <>
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2023-03-10 11:25:55 +11:00
mnh a081b62823
[Feature] Development quickstart guide and Makefile additions (#3495)
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2023-03-01 15:09:28 +11:00
WithoutPants 54c495d867
Remove netgo build tag from Windows builds (#3170) 2022-11-23 09:10:39 +11:00
WithoutPants a2ca266cb3
Upgrade to go 1.19 only (#3087)
* Update to go 1.19
* Update cross-compile script
* Add missing targets to cross-compile-all
* Update cache action to remove warning
2022-11-09 14:41:23 +11:00
WithoutPants 2609095c7a
Revert "Upgrade to go 1.19 and update dependencies (#3069)" (#3085)
This reverts commit bba7c23957.
2022-11-07 12:33:15 +11:00
WithoutPants bba7c23957
Upgrade to go 1.19 and update dependencies (#3069)
* Update to go 1.19
* Update dependencies
* Update cross-compile script
* Add missing targets to cross-compile-all
* Update cache action to remove warning
2022-11-04 13:41:26 +11:00
A Ghoul Coder 3ac3fe09b8
add `pre-ui` to default make target and update documentation (#3030)
Without `pre-ui`, `make` fails. `pre-ui` is already used in the GitHub
workflows but omitted from the Makefile and docs.
2022-10-26 09:18:02 +11:00
DingDongSoLong4 25bc750295
Performance improvements (#2925)
* Add sqlite_stat4 build tag
* Simplify studio filter criterion queries
* Prevent useList loading data before filter initialized
2022-09-30 10:49:51 +10:00
WithoutPants 00608c167a [Files Refactor] Performance tuning (#2819)
* Load scene relationships on demand
* Load image relationships on demand
* Load gallery relationships on demand
* Add dataloaden
* Use dataloaders
* Use where in for other find many functions
2022-09-06 07:03:42 +00:00
WithoutPants a8456dd188
Remove windowsgui from cross-compile-windows build target 2022-05-04 17:15:28 +10:00
WithoutPants a6f15273d9
Improve Windows stash behaviour (#2543)
* Rename manager.instance to Manager
* Show dialog message on fatal error on Windows
* Hide console windows explicitly on icon launch

Gets rid of the windowsgui flag, which causes all sorts of issues.
Instead, checks if stash was launched from the icon, and if so hides the console.

* Remove fixconsole
* Add changelog entries
2022-05-04 10:37:32 +10:00
kermieisinthehouse 4c4d029c23
Freebsd compile errors (#2477)
* Fix local docker builds under new projext org

* Fix Desktop package freebsd compile

* Fix build declaration

* rename systray file
2022-04-05 22:35:32 -07:00
WithoutPants 5eee305a33
Fix for #2401 2022-03-21 10:31:32 +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
kermieisinthehouse 0e514183a7
Desktop integration (#2073)
* Open stash in system tray on Windows/MacOS
* Add desktop notifications
* MacOS Bundling
* Add binary icon

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2022-02-03 11:20:34 +11:00
kermieisinthehouse 27c0fc8a18
Varied macOS fixes (#2044)
* Fix selects, fix ffprobe download, fix baseurl in dev server
2021-11-22 12:44:24 +11:00
kermieisinthehouse a4e52d3130
Vite-based frontend builds (#1900)
* Remove image conversion, add gzip
* Add MacOS Environment options
2021-11-18 12:32:04 +11:00
kermieisinthehouse f80a5e3222
Docker+Build optimizations (#1833)
* Docker CI builds: half the size, less than half the build time
* Add an "Official Build" Designator
* Fix .git constantly invalidating build cache, use distro ffmpeg
* Fix official build detection, add some compiler image docs

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2021-10-22 13:14:08 +11:00
SmallCoccinelle a2cce0ba77
Add golangci-lint workflow (#1759)
* Add golangci-lint workflow

* Add a bit more lenient linter timeout

1 Minute isn't always enough, so bump to 3.

* Document golangci, add make target

Document how to get golangci-lint in the README file. While here,
provide a QOL target in the makefile
for the linter, and make it part of validation.

* Introduce .golangci.yml

This is the default golangci-lint configuration file location. Use it.

Move configuration into the yaml file, and enable the default set of
linters; we know we pass most of those.

* Add gofmt and revive to golangci-lint

Read the golangci-lint source code to figure out the configuration format.

Copy the configuration from `revive.toml` into the linter configuration.

* Do not set simplify on gofmt

The project currently runs without simplify. So for consistency, don't
make that a requirement for the linter.

* Add new-from-rev

Older issues should not be considered a failure for new PRs and issues.
Use new-from-from to make the current develop as the point-in-time for
when we consider errors.

Once in the tree, we can go and fix the older errors in separate
patches, taking a little bit at a time.

* Move to golangci-lint

Rewrite the way we run targets in the makefile, so it is split between
frontend and backend.

Use the frontend build steps in build.yml

Update README to reflect the new world order.

* Remove check-gofmt.sh

The tool now runs as part of golangci-lint, in particular through the
'validate' target in the Makefile.

* Remove targets for golangci-lint

Fold these targets into the `lint` target. While here, update README.
2021-09-27 10:41:59 +10:00
WithoutPants 56111433a1
Replace packr with go embed (#1751)
* Embed performer images
* Embed schema migrations
* Update dependencies
* Embed UI
* Remove remaining packr references
2021-09-22 13:08:34 +10:00
kermieisinthehouse 265d5f4c70
Apple Silicon Support, Bump Go to 1.17, refactor docker/build/x86_64/Dockerfile (#1646)
* Bump Go to 1.17, refactor build/x86_64 Dockerfile to make better use of multi-stage
* Bump to 1.17 from 1.16
* Bump packr version, provide needed legacy env var
* Add apple silicon support, fix macos build chain
* Update unused travis ci
2021-09-08 15:30:15 +10:00
WithoutPants 9d138278c2
Github build action refinement and caching (#1295)
* Run in same container
* Add cross compile targets to makefile
* Use make targets and existing container
* Cache UI build
* Update cross-compile script
2021-05-16 19:19:56 +10:00
WithoutPants 7a45943e8e
Stash box client interface (#751)
* 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
2020-09-17 19:57:18 +10:00
WithoutPants 03d4826c85
Selective export (#770) 2020-09-15 17:28:53 +10:00
bnkai b527a8d137
Update makefile for static build (#808) 2020-09-14 11:12:36 +10:00
WithoutPants d516947af2
Strip debug symbols from release builds (#636)
* Add release target that strips debug symbols
* Make cross compile use make
2020-06-29 14:44:21 +10:00
WithoutPants 883a0e785a
Fix UI not showing version (#631) 2020-06-24 15:46:37 +10:00
WithoutPants 534d47500b
Integrate build version in UI (#629) 2020-06-23 09:51:57 +10:00
WithoutPants 3d22d5a742
Refactor build (#493)
* Add lint/format checks to build
* Make travis get full repo to get tags
* Run packr2 once in cross-compile
* Fix quotes in package.json
* Fix linting issues
* Formatting
* Fix vet issue
* Fix go lint issues
* Show start of each platform compilation
* Add validate target
* Set gitattributes for go fmt and mod vendor
* Fix tag name
* Add fmt-ui target
2020-04-29 12:13:08 +10:00
InfiniteTF aee9df966b
Cut over to v2.5 UI (#433)
* Cut over to v2.5 UI
* Use node 12 in travis
* Remove unnecessary `nvm use`
* Update docker file
2020-04-03 08:46:23 +11:00
WithoutPants 3c1eeb3d47
Prepare for 0.1.0 release (#345)
* Tag develop builds as latest. Version in makefile
* Rename latest to latest_develop
* Update GetLatestVersion
* Separate master and develop releases
* Add release date back into development version
* Remove unused code
* Two minute limit per file to upload to transfer.sh
2020-02-07 06:39:08 +11:00
FleetingOrchard b31af52d41 Fix usage of Box.Bytes causing depreciation message (#295)
* Add release make target

* Use Box.Find now that Box.Bytes is depreciated

Pretty much directly mocked off of the post-depreciation implementation
of Box.Bytes in packr. In theory we should totally be checking the
returned error but I'm lazy.
2019-12-28 09:53:16 -08:00
WithoutPants 2a02e5a65d Add test and integration tests to the Makefile (#222)
* Add unit and integration test to make file

* Add gitattributes for go.mod/go.sum files

* Always run integration tests

* Removed redundant call. Clarified targets
2019-11-24 21:10:16 -05:00
WithoutPants 6a75d5551f Use vendor when building (#201)
* Use vendor code for all go calls

* Add missing vendor dependencies

* Add travis_retry to yarn install

* Fix go test call
2019-11-16 08:03:28 -08:00
WithoutPants 019712bff9 Merge from master 2019-10-17 10:16:36 +11:00
WithoutPants eb0cd674c1 Use short git hash to be consistent with github 2019-10-17 09:46:16 +11:00
Friendly C 4627db8ade Use go generate for Packr2 and GraphQL files 2019-10-15 17:04:02 +02:00