* Push scrapeByURL into scrapers Replace ScrapePerfomerByURL, ScrapeMovie..., ... with ScrapeByURL in the scraperActionImpl interface. This allows us to delete a lot of repeated code in the scrapers and replace the central part with a switch on the scraper type. * Fold name scraping into one call Follow up on scraper refactoring. Name scrapers use the same code path. This allows us to restructure some code and kill some functions, adding variance to the name scraping code. It allows us to remove some code repetition as well. * Do not export loop refs. * Simplify fragment scraping Generalize fragment scrapers into ScrapeByFragment. This simplifies fragment code flows into a simpler pathing which should be easier to handle in the future. * Eliminate more context.TODO() In a number of cases, we have a context now. Use the context rather than TODO() for those cases in order to make those operations cancellable. * Pass the context for the stashbox scraper This removes all context.TODO() in the path of the stashbox scraper, and replaces it with the context that's present on each of the paths. * Pass the context into subscrapers Mostly a mechanical update, where we pass in the context for subscraping. This removes the final context.TODO() in the scraper code. * Warn on unknown fields from scripts A common mistake for new script writers are that they return fields not known to stash. For instance the name "description" is used rather than "details". Decode disallowing unknown fields. If this fails, use a tee-reader to fall back to the old behavior, but print a warning for the user in this case. Thus, we retain the old behavior, but print warnings for scripts which fails the more strict unknown-fields detection. * Nil-check before running the postprocessing chain Fixes panics when scraping returns nil values. * Lift nil-ness in post-postprocessing If the struct we are trying to post-process is nil, we shouldn't enter the postprocessing flow at all. Pass the struct as a value rather than a pointer, eliminating nil-checks as we go. Use the top-level postProcess call to make the nil-check and then abort there if the object we are looking at is nil. * Allow conversion routines to handle values If we have a non-pointer type in the interface, we should also convert those into ScrapedContent. Otherwise we get errors on deprecated functions. |
||
|---|---|---|
| .github | ||
| .idea | ||
| docker | ||
| docs | ||
| graphql | ||
| pkg | ||
| scripts | ||
| ui | ||
| vendor | ||
| .dockerignore | ||
| .gitattributes | ||
| .gitignore | ||
| .golangci.yml | ||
| .gqlgenc.yml | ||
| go.mod | ||
| go.sum | ||
| gqlgen.yml | ||
| LICENSE | ||
| main.go | ||
| main_test.go | ||
| Makefile | ||
| README.md | ||
| tools.go | ||
Stash
Stash is a self-hosted webapp written in Go which organizes and serves your porn.
- Stash gathers information about videos in your collection from the internet, and is extensible through the use of community-built plugins for a large number of content producers and sites.
- Stash supports a wide variety of both video and image formats.
- You can tag videos and find them later.
- Stash provides statistics about performers, tags, studios and more.
You can watch a SFW demo video to see it in action.
For further information you can read the in-app manual.
Installing Stash
Getting Started
Run the executable (double click the exe on windows or run ./stash-osx / ./stash-linux from the terminal on macOS / Linux) to get started.
Note for Windows users: Running the app might present a security prompt since the binary isn't yet signed. Bypass this by clicking "more info" and then the "run anyway" button.
FFMPEG
Stash requires ffmpeg. If you don't have it installed, Stash will download a copy for you. It is recommended that Linux users install ffmpeg from their distro's package manager.
Usage
Quickstart Guide
Download and run Stash. It will prompt you for some configuration options and a directory to index (you can also do this step afterward)
If you'd like to automatically retrieve and organize information about your entire library, You will need to download some scrapers. The Stash community has developed scrapers for many popular data sources which can be downloaded and installed from this repository.
The simplest way to tag a large number of files is by using the Tagger which uses filename keywords to help identify the file and pull in scene and performer information from our stash-box database. Note that this data source is not comprehensive and you may need to use the scrapers to identify some of your media.
Translation
Stash is available in 9 languages (so far!) and it could be in your language too. If you want to help us translate Stash into your language, you can make an account at translate.stashapp.cc to get started contributing new languages or improving existing ones. Thanks!
Support (FAQ)
Answers to other Frequently Asked Questions can be found on our Wiki
For issues not addressed there, there are a few options.
- Read the Wiki
- Check the in-app documentation, in the top right corner of the app (also available here
- Join the Discord server, where the community can offer support.
Customization
Themes and CSS Customization
There is a directory of community-created themes on our Wiki, along with instructions on how to install them.
You can also make Stash interface fit your desired style with Custom CSS snippets.
For Developers
Pull requests are welcome!
See Development and Contributing for information on working with the codebase, getting a local development setup, and contributing changes.
