Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge to master for release #2498

Merged
merged 67 commits into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
d88515a
Autotag optimisation (#2368)
WithoutPants Mar 9, 2022
a059528
i18n: Migrate hard strings (#2353)
Still34 Mar 9, 2022
7bd47c6
Read theme color from config file (#2365)
cj12312021 Mar 9, 2022
e4d6d3b
Use case-insensitive matching in nameMatchesPath (#2378)
WithoutPants Mar 10, 2022
9e3d56b
Fix identify and script scraper bugs (#2375)
WithoutPants Mar 14, 2022
984eba8
Merge branch 'develop' into v0.13.1-to-develop
WithoutPants Mar 16, 2022
c4ee40a
Remove redundant changelog entry
WithoutPants Mar 16, 2022
dcee874
Merge pull request #2387 from WithoutPants/v0.13.1-to-develop
WithoutPants Mar 16, 2022
f69bd8a
Restructure go project (#2356)
WithoutPants Mar 17, 2022
6ceb9c7
Don't generate thumbnails for webp (#2388)
WithoutPants Mar 20, 2022
e4ad42c
Order gallery images by path (#2390)
WithoutPants Mar 20, 2022
dd0fa48
Move tag exclusion to scrape query resolver (#2391)
WithoutPants Mar 20, 2022
5eee305
Fix for #2401
WithoutPants Mar 20, 2022
228e8c9
Scroll to next image using lightbox (#2403)
WithoutPants Mar 22, 2022
b4ecb63
Use first sorted by path image as cover by default (#2407)
WithoutPants Mar 22, 2022
4c4cdae
Don't include stash_ids if not setting (#2408)
WithoutPants Mar 22, 2022
2afb467
Persist lightbox settings (#2406)
WithoutPants Mar 22, 2022
329b611
Fix local docker builds under new projext org (#2411)
kermieisinthehouse Mar 23, 2022
0cd9a0a
Python path setting (#2409)
WithoutPants Mar 23, 2022
627c1e9
Fix plugin go examples (#2396)
bnkai Mar 24, 2022
ba41133
Fix ffmpeg download (#2416)
bnkai Mar 24, 2022
23c4642
Always open browser from systray (#2418)
WithoutPants Mar 24, 2022
994e39e
Initialise queryConfig if not present (#2419)
WithoutPants Mar 24, 2022
2d227ed
Only cache log items that meet minimum log level (#2421)
WithoutPants Mar 25, 2022
f581687
Improve performance of gallery and image queries (#2422)
WithoutPants Mar 25, 2022
37632f9
Fix windows ffmpeg concat path (#2425)
WithoutPants Mar 25, 2022
2099d10
Translations update from Stash (#2360)
stash-translation-bot Mar 26, 2022
a2c611f
Fix lightbox issues (#2426)
WithoutPants Mar 27, 2022
02ee791
Fix missing date filter (#2434)
WithoutPants Mar 28, 2022
f3355f3
Replace JW Player with video.js (#2100)
Mar 28, 2022
743bbc4
Bump minimist from 1.2.5 to 1.2.6 in /ui/v2.5 (#2437)
dependabot[bot] Mar 29, 2022
c4c62d2
Scene player fixes (#2441)
WithoutPants Mar 29, 2022
22e0c9a
Create FUNDING.yml
kermieisinthehouse Mar 29, 2022
f1b244f
Delete FUNDING.yml
kermieisinthehouse Mar 29, 2022
41d6ebc
allow full screen and inline play on iOS (#2450)
cj12312021 Mar 30, 2022
df982f7
use min value for skipping forward (#2454)
stg-annon Mar 30, 2022
510bec6
Add marker videojs plugin (#2447)
WithoutPants Mar 30, 2022
6c3b493
Add persist volume plugin (#2448)
WithoutPants Mar 30, 2022
d262d18
Add source selector plugin (#2449)
WithoutPants Mar 31, 2022
e54268c
Videojs big buttons (#2455)
WithoutPants Mar 31, 2022
0880991
Ignore key combination on KeyboardEvents (#2460)
stg-annon Apr 1, 2022
f4a9ea7
Fix 10bit vp9 streaming (#2458)
WithoutPants Apr 1, 2022
b504a89
Fix video filters (#2459)
WithoutPants Apr 1, 2022
e5c4241
Don't overwrite with empty values in tagger (#2461)
WithoutPants Apr 2, 2022
45f700d
Support Go 1.18: Upgrade gqlgen to v0.17.2 (#2443)
SmallCoccinelle Apr 2, 2022
9e2261a
Temporarily disable caching in lint action
WithoutPants Apr 2, 2022
f9cf77e
Improve bulk performer editing (#2467)
WithoutPants Apr 2, 2022
0ee8930
Do not display tabs with no content (#2468)
WithoutPants Apr 2, 2022
6ca862b
Mobile scene details page revamp (#2466)
cj12312021 Apr 3, 2022
6ebf3dd
Add support for the Handy APIv2 (#2193)
chetbrinko Apr 3, 2022
92320b3
Fix lightbox issues (#2457)
WithoutPants Apr 3, 2022
e76e4c9
Fix scene edit panel not updating on scene change (#2471)
WithoutPants Apr 4, 2022
eb35bba
Remove redundant message
WithoutPants Apr 4, 2022
2aee6cc
Update v0140.md file with scene detail page update (#2472) [skip ci]
cj12312021 Apr 4, 2022
61d9f57
Add ignore autotag flag (#2439)
WithoutPants Apr 4, 2022
230d8f6
Make desktop.Start run on main thread (#2475)
WithoutPants Apr 5, 2022
312d43d
Fix only one tag markers on scene (#2482)
kermieisinthehouse Apr 5, 2022
ed08dd4
Fix CSP directives for playground (#2484)
WithoutPants Apr 6, 2022
a702d0b
Use bug report label for bug reports [skip ci]
WithoutPants Apr 6, 2022
b0f6f4b
Use feature request label for feature requests [skip ci]
WithoutPants Apr 6, 2022
2ca457c
Revert #2466 due to portrait video issues (#2486)
WithoutPants Apr 6, 2022
638b2b4
Revert "Do not display tabs with no content (#2468)" (#2487)
WithoutPants Apr 6, 2022
4c4d029
Freebsd compile errors (#2477)
kermieisinthehouse Apr 6, 2022
346384b
Merge performer list when saving scene from tagger (#2483)
WithoutPants Apr 6, 2022
8cdf009
Handle graphql errors correctly during draft submission (#2485)
WithoutPants Apr 6, 2022
5636b48
Translations update from Stash (#2435)
stash-translation-bot Apr 10, 2022
2b8a40e
Fix scene studio message id
WithoutPants Apr 10, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report
about: Create a report to help us improve
title: "[Bug Report] Short Form Subject (50 Chars or less)"
labels: help wanted
labels: bug report
assignees: ''

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea for this project
title: "[Feature] Short Form Title (50 chars or less.)"
labels: enhancement
labels: feature request
assignees: ''

---
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,8 @@ jobs:

# Static validation happens in the linter workflow in parallel to this workflow
# Run Dynamic validation here, to make sure we pass all the projects integration tests
#
# create UI file so that the embed doesn't fail
- name: Test Backend
run: |
mkdir -p ui/v2.5/build
touch ui/v2.5/build/index.html
docker exec -t build /bin/bash -c "make it"
run: docker exec -t build /bin/bash -c "make it"

- name: Build UI
# skip UI build for pull requests if UI is unchanged (UI was cached)
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: golangci/golangci-lint-action@v2
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.42.1
version: v1.45.2

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand All @@ -51,10 +51,10 @@ jobs:
# skip-go-installation: true

# Optional: if set to true then the action don't cache or restore ~/go/pkg.
# skip-pkg-cache: true
skip-pkg-cache: true

# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
# skip-build-cache: true
skip-build-cache: true

- name: Cleanup build container
run: docker rm -f -v build
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ node_modules

*.db

stash
/stash
dist
.DS_Store
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ linters:
- unused
- varcheck
# Linters added by the stash project.
# - contextcheck
- dogsled
# - errchkjson
- errorlint
# - exhaustive
- exportloopref
Expand Down
5 changes: 5 additions & 0 deletions .gqlgenc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
model:
package: graphql
filename: ./pkg/scraper/stashbox/graphql/generated_models.go
client:
package: graphql
filename: ./pkg/scraper/stashbox/graphql/generated_client.go
models:
Date:
Expand All @@ -11,3 +13,6 @@ endpoint:
url: https://stashdb.org/graphql
query:
- "./graphql/stash-box/*.graphql"
generate:
clientV2: false
clientInterfaceName: "StashBoxGraphQLClient"
30 changes: 24 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,17 @@ ifndef OFFICIAL_BUILD
$(eval OFFICIAL_BUILD := false)
endif

build: pre-build
ifdef IS_WIN_OS
ifndef SUPPRESS_WINDOWSGUI
PLATFORM_SPECIFIC_LDFLAGS := -H windowsgui
endif
endif

build: pre-build
build:
$(eval LDFLAGS := $(LDFLAGS) -X 'github.com/stashapp/stash/pkg/api.version=$(STASH_VERSION)' -X 'github.com/stashapp/stash/pkg/api.buildstamp=$(BUILD_DATE)' -X 'github.com/stashapp/stash/pkg/api.githash=$(GITHASH)')
$(eval LDFLAGS := $(LDFLAGS) -X 'github.com/stashapp/stash/pkg/manager/config.officialBuild=$(OFFICIAL_BUILD)')
go build $(OUTPUT) -mod=vendor -v -tags "sqlite_omit_load_extension osusergo netgo" $(GO_BUILD_FLAGS) -ldflags "$(LDFLAGS) $(EXTRA_LDFLAGS) $(PLATFORM_SPECIFIC_LDFLAGS)"
$(eval LDFLAGS := $(LDFLAGS) -X 'github.com/stashapp/stash/internal/api.version=$(STASH_VERSION)' -X 'github.com/stashapp/stash/internal/api.buildstamp=$(BUILD_DATE)' -X 'github.com/stashapp/stash/internal/api.githash=$(GITHASH)')
$(eval LDFLAGS := $(LDFLAGS) -X 'github.com/stashapp/stash/internal/manager/config.officialBuild=$(OFFICIAL_BUILD)')
go build $(OUTPUT) -mod=vendor -v -tags "sqlite_omit_load_extension osusergo netgo" $(GO_BUILD_FLAGS) -ldflags "$(LDFLAGS) $(EXTRA_LDFLAGS) $(PLATFORM_SPECIFIC_LDFLAGS)" ./cmd/stash

# strips debug symbols from the release build
build-release: EXTRA_LDFLAGS := -s -w
Expand Down Expand Up @@ -107,6 +110,11 @@ cross-compile-macos:
cd dist && zip -r Stash-macos.zip Stash.app && cd ..
rm -rf dist/Stash.app

cross-compile-freebsd: export GOOS := freebsd
cross-compile-freebsd: export GOARCH := amd64
cross-compile-freebsd: OUTPUT := -o dist/stash-freebsd
cross-compile-freebsd: build-release-static

cross-compile-linux: export GOOS := linux
cross-compile-linux: export GOARCH := amd64
cross-compile-linux: OUTPUT := -o dist/stash-linux
Expand Down Expand Up @@ -140,6 +148,16 @@ cross-compile-all:
make cross-compile-linux-arm32v7
make cross-compile-linux-arm32v6

.PHONY: touch-ui
touch-ui:
ifndef IS_WIN_SHELL
@mkdir -p ui/v2.5/build
@touch ui/v2.5/build/index.html
else
@if not exist "ui\\v2.5\\build" mkdir ui\\v2.5\\build
@type nul >> ui/v2.5/build/index.html
endif

# Regenerates GraphQL files
generate: generate-backend generate-frontend

Expand All @@ -148,8 +166,8 @@ generate-frontend:
cd ui/v2.5 && yarn run gqlgen

.PHONY: generate-backend
generate-backend:
go generate -mod=vendor
generate-backend: touch-ui
go generate -mod=vendor ./cmd/stash

# Regenerates stash-box client files
.PHONY: generate-stash-box-client
Expand Down
31 changes: 14 additions & 17 deletions main.go → cmd/stash/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,21 @@
package main

import (
"embed"
"fmt"
"os"
"os/signal"
"runtime/pprof"
"syscall"

"github.com/apenwarr/fixconsole"
"github.com/stashapp/stash/pkg/api"
"github.com/stashapp/stash/pkg/manager"
"github.com/stashapp/stash/internal/api"
"github.com/stashapp/stash/internal/desktop"
"github.com/stashapp/stash/internal/manager"
"github.com/stashapp/stash/ui"

_ "github.com/golang-migrate/migrate/v4/database/sqlite3"
_ "github.com/golang-migrate/migrate/v4/source/file"
)

//go:embed ui/v2.5/build
var uiBox embed.FS

//go:embed ui/login
var loginUIBox embed.FS

func init() {
// On Windows, attach to parent shell
err := fixconsole.FixConsoleIfNeeded()
Expand All @@ -33,20 +27,23 @@ func init() {

func main() {
manager.Initialize()
api.Start(uiBox, loginUIBox)

blockForever()
api.Start()

// stop any profiling at exit
pprof.StopCPUProfile()
go handleSignals()
desktop.Start(manager.GetInstance(), &manager.FaviconProvider{UIBox: ui.UIBox})

manager.GetInstance().Shutdown(0)
blockForever()
}

func blockForever() {
func handleSignals() {
// handle signals
signals := make(chan os.Signal, 1)
signal.Notify(signals, syscall.SIGINT, syscall.SIGTERM)

<-signals
manager.GetInstance().Shutdown(0)
}

func blockForever() {
select {}
}
File renamed without changes.
4 changes: 3 additions & 1 deletion docker/build/x86_64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ COPY ./go* ./*.go Makefile gqlgen.yml .gqlgenc.yml /stash/
COPY ./scripts /stash/scripts/
COPY ./vendor /stash/vendor/
COPY ./pkg /stash/pkg/
COPY ./cmd /stash/cmd
COPY ./internal /stash/internal
COPY --from=frontend /stash /stash/
RUN make generate-backend
ARG GITHASH
Expand All @@ -35,4 +37,4 @@ RUN apk add --no-cache ca-certificates vips-tools ffmpeg
COPY --from=backend /stash/stash /usr/bin/
ENV STASH_CONFIG_FILE=/root/.stash/config.yml
EXPOSE 9999
ENTRYPOINT ["stash"]
ENTRYPOINT ["stash"]
51 changes: 24 additions & 27 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/stashapp/stash

require (
github.com/99designs/gqlgen v0.12.2
github.com/Yamashou/gqlgenc v0.0.0-20200902035953-4dbef3551953
github.com/99designs/gqlgen v0.17.2
github.com/Yamashou/gqlgenc v0.0.6
github.com/anacrolix/dms v1.2.2
github.com/antchfx/htmlquery v1.2.5-0.20211125074323-810ee8082758
github.com/chromedp/cdproto v0.0.0-20210622022015-fe1827b46b84
Expand All @@ -16,10 +16,9 @@ require (
github.com/gorilla/securecookie v1.1.1
github.com/gorilla/sessions v1.2.0
github.com/gorilla/websocket v1.4.2
github.com/h2non/filetype v1.0.8
github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a
github.com/jmoiron/sqlx v1.3.1
github.com/json-iterator/go v1.1.11
github.com/json-iterator/go v1.1.12
github.com/mattn/go-sqlite3 v1.14.6
github.com/natefinch/pie v0.0.0-20170715172608-9a0d72014007
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8
Expand All @@ -28,20 +27,20 @@ require (
github.com/rs/cors v1.6.0
github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f
github.com/sirupsen/logrus v1.8.1
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.9.0
github.com/spf13/viper v1.10.1
github.com/stretchr/testify v1.7.0
github.com/tidwall/gjson v1.9.3
github.com/tidwall/pretty v1.2.0 // indirect
github.com/vektra/mockery/v2 v2.2.1
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5
github.com/vektra/mockery/v2 v2.10.0
golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb
golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b
golang.org/x/sys v0.0.0-20220329152356-43be30ef3008
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
golang.org/x/text v0.3.7
golang.org/x/tools v0.1.5 // indirect
golang.org/x/tools v0.1.10 // indirect
gopkg.in/sourcemap.v1 v1.0.5 // indirect
gopkg.in/yaml.v2 v2.4.0
)
Expand All @@ -50,19 +49,20 @@ require (
github.com/apenwarr/fixconsole v0.0.0-20191012055117-5a9f6489cc29
github.com/go-chi/httplog v0.2.1
github.com/go-toast/toast v0.0.0-20190211030409-01e6764cf0a4
github.com/hashicorp/golang-lru v0.5.4
github.com/kermieisinthehouse/gosx-notifier v0.1.1
github.com/kermieisinthehouse/systray v1.2.4
github.com/lucasb-eyer/go-colorful v1.2.0
github.com/vearutop/statigz v1.1.6
github.com/vektah/gqlparser/v2 v2.0.1
github.com/vektah/gqlparser/v2 v2.4.1
)

require (
github.com/agnivade/levenshtein v1.1.0 // indirect
github.com/agnivade/levenshtein v1.1.1 // indirect
github.com/antchfx/xpath v1.2.0 // indirect
github.com/apenwarr/w32 v0.0.0-20190407065021-aa00fece76ab // indirect
github.com/chromedp/sysutil v1.0.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-chi/chi/v5 v5.0.0 // indirect
Expand All @@ -72,37 +72,34 @@ require (
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.0 // indirect
github.com/hashicorp/golang-lru v0.5.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matryer/moq v0.0.0-20200106131100-75d0ddfc0007 // indirect
github.com/matryer/moq v0.2.6 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.4.2 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rs/zerolog v1.18.1-0.20200514152719-663cbb4c8469 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/rs/zerolog v1.26.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/cobra v1.0.0 // indirect
github.com/spf13/cobra v1.4.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/stretchr/objx v0.2.0 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/urfave/cli/v2 v2.1.1 // indirect
github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e // indirect
github.com/urfave/cli/v2 v2.4.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
golang.org/x/mod v0.4.2 // indirect
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
gopkg.in/ini.v1 v1.63.2 // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)

Expand Down
Loading