mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Update manual documentation (#4921)
This commit is contained in:
@@ -5,6 +5,7 @@ When media filepaths or filenames contain a Performer, Studio, or Tag name, it i
|
|||||||
When the Performer/Studio/Tag name has multiple words, the search will include paths/filenames where the Performer/Studio/Tag name is separated with `.`, `-`, `_`, and whitespace characters.
|
When the Performer/Studio/Tag name has multiple words, the search will include paths/filenames where the Performer/Studio/Tag name is separated with `.`, `-`, `_`, and whitespace characters.
|
||||||
|
|
||||||
For example, auto tagging for performer `Jane Doe` will match the following filenames:
|
For example, auto tagging for performer `Jane Doe` will match the following filenames:
|
||||||
|
|
||||||
* `Jane.Doe.1.mp4`
|
* `Jane.Doe.1.mp4`
|
||||||
* `Jane_Doe.2.mp4`
|
* `Jane_Doe.2.mp4`
|
||||||
* `Jane-Doe.3.mp4`
|
* `Jane-Doe.3.mp4`
|
||||||
@@ -14,4 +15,4 @@ Matching is case insensitive, and should only match exact wording within word bo
|
|||||||
|
|
||||||
Auto tagging for specific Performers, Studios, and Tags can be performed from the individual Performer/Studio/Tag page.
|
Auto tagging for specific Performers, Studios, and Tags can be performed from the individual Performer/Studio/Tag page.
|
||||||
|
|
||||||
> Note: Performer autotagging does not currently match on performer aliases.
|
> **Note:** Performer autotagging does not currently match on performer aliases.
|
||||||
@@ -18,6 +18,7 @@ The text field allows you to search using keywords. Keyword searching matches on
|
|||||||
| Tag | Name, Aliases |
|
| Tag | Name, Aliases |
|
||||||
|
|
||||||
Keyword matching uses the following rules:
|
Keyword matching uses the following rules:
|
||||||
|
|
||||||
* all words are required in the matching field. For example, `foo bar` matches scenes with both `foo` and `bar` in the title.
|
* all words are required in the matching field. For example, `foo bar` matches scenes with both `foo` and `bar` in the title.
|
||||||
* the `or` keyword or symbol (`|`) is used to match either fields. For example, `foo or bar` (or `foo | bar`) matches scenes with `foo` or `bar` in the title. Or sets can be combined. For example, `foo or bar or baz xyz or zyx` matches scenes with one of `foo`, `bar` and `baz`, *and* `xyz` or `zyx`.
|
* the `or` keyword or symbol (`|`) is used to match either fields. For example, `foo or bar` (or `foo | bar`) matches scenes with `foo` or `bar` in the title. Or sets can be combined. For example, `foo or bar or baz xyz or zyx` matches scenes with one of `foo`, `bar` and `baz`, *and* `xyz` or `zyx`.
|
||||||
* the not symbol (`-`) is used to exclude terms. For example, `foo -bar` matches scenes with `foo` and excludes those with `bar`. The not symbol cannot be combined with an or operand. That is, `-foo or bar` will be interpreted to match `-foo` or `bar`. On the other hand, `foo or bar -baz` will match `foo` or `bar` and exclude `baz`.
|
* the not symbol (`-`) is used to exclude terms. For example, `foo -bar` matches scenes with `foo` and excludes those with `bar`. The not symbol cannot be combined with an or operand. That is, `-foo or bar` will be interpreted to match `-foo` or `bar`. On the other hand, `foo or bar -baz` will match `foo` or `bar` and exclude `baz`.
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
# Configuration
|
# Configuration
|
||||||
|
|
||||||
## Stashes
|
## Library
|
||||||
|
|
||||||
This section allows you to add and remove directories from your library list. Files in these directories will be included when scanning. Files that are outside of these directories will be removed when running the Clean task.
|
This section allows you to add and remove directories from your library list. Files in these directories will be included when scanning. Files that are outside of these directories will be removed when running the Clean task.
|
||||||
|
|
||||||
> **⚠️ Note:** Don't forget to click `Save` after updating these directories!
|
> **⚠️ Note:** Don't forget to click `Save` after updating these directories!
|
||||||
|
|
||||||
## Excluded Patterns
|
## Excluded patterns
|
||||||
|
|
||||||
Given a valid [regex](https://github.com/google/re2/wiki/Syntax), files that match even partially are excluded during the Scan process and are not entered in the database. Also during the Clean task if these files exist in the DB they are removed from it and their generated files get deleted.
|
Given a valid [regex](https://github.com/google/re2/wiki/Syntax), files that match even partially are excluded during the Scan process and are not entered in the database. Also during the Clean task if these files exist in the DB they are removed from it and their generated files get deleted.
|
||||||
Prior to matching both the filenames and patterns are converted to lower case so the match is case insensitive.
|
Prior to matching both the filenames and patterns are converted to lower case so the match is case insensitive.
|
||||||
@@ -15,28 +15,21 @@ Regex patterns can be added in the config file or from the UI.
|
|||||||
If you add manually to the config file a restart is needed while from the UI you just need to click the Save button.
|
If you add manually to the config file a restart is needed while from the UI you just need to click the Save button.
|
||||||
When added through the config file directly special care must be given to double escape the `\` character.
|
When added through the config file directly special care must be given to double escape the `\` character.
|
||||||
|
|
||||||
Some examples
|
There are 2 sperate exclusion settings. One is for videos, another is for images/galleries.
|
||||||
|
|
||||||
For the config file you need the following added
|
Some examples:
|
||||||
```
|
|
||||||
exclude:
|
|
||||||
- "sample\\.mp4$"
|
|
||||||
- "/\\.[[:word:]]+/"
|
|
||||||
- "c:\\\\stash\\\\videos\\\\exclude"
|
|
||||||
- "^/stash/videos/exclude/"
|
|
||||||
- "\\\\\\\\stash\\network\\\\share\\\\excl\\\\"
|
|
||||||
```
|
|
||||||
* the first excludes all files ending in `sample.mp4` ( `.` needs to be escaped also)
|
|
||||||
* the second hidden directories `/.directoryname/`
|
|
||||||
* the third is an example for a windows directory `c:\stash\videos\exclude`
|
|
||||||
* the fourth the directory `/stash/videos/exclude/`
|
|
||||||
* and the last a windows network path `\\stash\network\share\excl\`
|
|
||||||
|
|
||||||
**Note:** if a directory is excluded for images and videos, then the directory will be excluded from scans completely.
|
- `"sample\.mp4$"` will exclude all files ending in `sample.mp4`.
|
||||||
|
- `"/\.[[:word:]]+/"` will exclude all hidden directories like `/.directoryname/`.
|
||||||
|
- `"c:\\stash\\videos\\exclude"` will exclude specific Windows directory `c:\stash\videos\exclude`.
|
||||||
|
- `"^/stash/videos/exclude/"` will exclude all directories that match `/stash/videos/exclude/` pattern.
|
||||||
|
- `"\\\\stash\\network\\share\\excl\\"` will exlcude specific Windows network path `\\stash\network\share\excl\`.
|
||||||
|
|
||||||
_a useful [link](https://regex101.com/) to experiment with regexps_
|
> **Note:** If a directory is excluded for images and videos, then the directory will be excluded from scans completely.
|
||||||
|
|
||||||
## Gallery Creation from Folders
|
_There is a useful [regex101](https://regex101.com/) site that can help test and experiment with regexps._
|
||||||
|
|
||||||
|
## Gallery creation from folders
|
||||||
|
|
||||||
In the Library section you can find an option to create a gallery from each folder containing images. This will be applied on all libraries when activated, including the base folder of a library.
|
In the Library section you can find an option to create a gallery from each folder containing images. This will be applied on all libraries when activated, including the base folder of a library.
|
||||||
|
|
||||||
@@ -71,11 +64,11 @@ After changing the file naming hash, any existing generated files will now be na
|
|||||||
These instructions are for existing users whose systems will be defaulted to use and calculate MD5 checksums. Once completed, MD5 checksums will no longer be calculated when scanning, and oshash will be used for generated file naming. Existing calculated MD5 checksums will remain on scenes, but checksums will not be calculated for new scenes.
|
These instructions are for existing users whose systems will be defaulted to use and calculate MD5 checksums. Once completed, MD5 checksums will no longer be calculated when scanning, and oshash will be used for generated file naming. Existing calculated MD5 checksums will remain on scenes, but checksums will not be calculated for new scenes.
|
||||||
|
|
||||||
1. Scan the library (to populate oshash for all existing scenes).
|
1. Scan the library (to populate oshash for all existing scenes).
|
||||||
2. In Settings -> Configuration page, untick `Calculate MD5` and select `oshash` as file naming hash. Save the configuration.
|
2. In Settings -> System page, untick `Calculate MD5` and select `oshash` as file naming hash. Save the configuration.
|
||||||
3. In Settings -> Tasks page, click on the `Rename generated files` migration button.
|
3. In Settings -> Tasks page, click on the `Rename generated files` migration button.
|
||||||
|
|
||||||
|
|
||||||
## Parallel Scan/Generation
|
## Parallel scan/generation
|
||||||
|
|
||||||
#### Number of parallel task for scan/generation
|
#### Number of parallel task for scan/generation
|
||||||
|
|
||||||
@@ -84,16 +77,17 @@ This setting controls how many sub-tasks will be run in parallel during scanning
|
|||||||
Auto-detection can be enabled by setting this to zero. This will calculate the number of parallel tasks to be logical cores/4 + 1.
|
Auto-detection can be enabled by setting this to zero. This will calculate the number of parallel tasks to be logical cores/4 + 1.
|
||||||
|
|
||||||
This setting can be used to increase/decrease overall CPU utilisation in two scenarios:
|
This setting can be used to increase/decrease overall CPU utilisation in two scenarios:
|
||||||
1) High performance 4+ core cpus.
|
|
||||||
2) Media files stored on remote/cloud filesystem.
|
1. High performance 4+ core cpus.
|
||||||
|
2. Media files stored on remote/cloud filesystem.
|
||||||
|
|
||||||
Note: If this is set too high it will decrease overall performance and causes failures (out of memory).
|
Note: If this is set too high it will decrease overall performance and causes failures (out of memory).
|
||||||
|
|
||||||
## Hardware Accelerated Live Transcoding
|
## Hardware accelerated live transcoding
|
||||||
|
|
||||||
Hardware accelerated live transcoding can be enabled by setting the `FFmpeg hardware encoding` setting. Stash outputs the supported hardware encoders to the log file on startup at the Info log level. If a given hardware encoder is not supported, it's error message is logged to the Debug log level for debugging purposes.
|
Hardware accelerated live transcoding can be enabled by setting the `FFmpeg hardware encoding` setting. Stash outputs the supported hardware encoders to the log file on startup at the Info log level. If a given hardware encoder is not supported, it's error message is logged to the Debug log level for debugging purposes.
|
||||||
|
|
||||||
## HLS/DASH Streaming
|
## HLS/DASH streaming
|
||||||
|
|
||||||
To stream using HLS (such as on Apple devices) or DASH, the Cache path must be set. This directory is used to store temporary files during the live-transcoding process. The Cache path can be set in the System settings page.
|
To stream using HLS (such as on Apple devices) or DASH, the Cache path must be set. This directory is used to store temporary files during the live-transcoding process. The Cache path can be set in the System settings page.
|
||||||
|
|
||||||
|
|||||||
@@ -6,19 +6,19 @@ Embedded plugin tasks are executed within the stash process using a scripting sy
|
|||||||
|
|
||||||
Stash currently supports Javascript embedded plugin tasks using [goja](https://github.com/dop251/goja).
|
Stash currently supports Javascript embedded plugin tasks using [goja](https://github.com/dop251/goja).
|
||||||
|
|
||||||
# Javascript plugins
|
## Javascript plugins
|
||||||
|
|
||||||
## Plugin input
|
### Plugin input
|
||||||
|
|
||||||
The input is provided to Javascript plugin tasks using the `input` global variable, and is an object based on the structure provided in the `Plugin input` section of the [Plugins](/help/Plugins.md) page. Note that the `server_connection` field should not be necessary in most embedded plugins.
|
The input is provided to Javascript plugin tasks using the `input` global variable, and is an object based on the structure provided in the `Plugin input` section of the [Plugins](/help/Plugins.md) page. Note that the `server_connection` field should not be necessary in most embedded plugins.
|
||||||
|
|
||||||
## Plugin output
|
### Plugin output
|
||||||
|
|
||||||
The output of a Javascript plugin task is derived from the evaluated value of the script. The output should conform to the structure provided in the `Plugin output` section of the [Plugins](/help/Plugins.md) page.
|
The output of a Javascript plugin task is derived from the evaluated value of the script. The output should conform to the structure provided in the `Plugin output` section of the [Plugins](/help/Plugins.md) page.
|
||||||
|
|
||||||
There are a number of ways to return the plugin output:
|
There are a number of ways to return the plugin output:
|
||||||
|
|
||||||
### Example #1
|
#### Example #1
|
||||||
```
|
```
|
||||||
(function() {
|
(function() {
|
||||||
return {
|
return {
|
||||||
@@ -27,7 +27,7 @@ There are a number of ways to return the plugin output:
|
|||||||
})();
|
})();
|
||||||
```
|
```
|
||||||
|
|
||||||
### Example #2
|
#### Example #2
|
||||||
```
|
```
|
||||||
function main() {
|
function main() {
|
||||||
return {
|
return {
|
||||||
@@ -38,7 +38,7 @@ function main() {
|
|||||||
main();
|
main();
|
||||||
```
|
```
|
||||||
|
|
||||||
### Example #3
|
#### Example #3
|
||||||
```
|
```
|
||||||
var output = {
|
var output = {
|
||||||
Output: "ok"
|
Output: "ok"
|
||||||
@@ -51,20 +51,20 @@ output;
|
|||||||
|
|
||||||
See the `Javascript API` section below on how to log with Javascript plugins.
|
See the `Javascript API` section below on how to log with Javascript plugins.
|
||||||
|
|
||||||
# Plugin configuration file format
|
## Plugin configuration file format
|
||||||
|
|
||||||
## exec
|
### exec
|
||||||
|
|
||||||
For embedded plugins, the `exec` field is a list with the first element being the path to the Javascript file that will be executed. It is expected that the path to the Javascript file is relative to the directory of the plugin configuration file.
|
For embedded plugins, the `exec` field is a list with the first element being the path to the Javascript file that will be executed. It is expected that the path to the Javascript file is relative to the directory of the plugin configuration file.
|
||||||
|
|
||||||
## interface
|
### interface
|
||||||
|
|
||||||
For embedded plugins, the `interface` field must be set to one of the following values:
|
For embedded plugins, the `interface` field must be set to one of the following values:
|
||||||
* `js`
|
* `js`
|
||||||
|
|
||||||
# Javascript API
|
## Javascript API
|
||||||
|
|
||||||
## Logging
|
### Logging
|
||||||
|
|
||||||
Stash provides the following API for logging in Javascript plugins:
|
Stash provides the following API for logging in Javascript plugins:
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ Stash provides the following API for logging in Javascript plugins:
|
|||||||
| `log.Error(<string>)` | Log with the `error` log level. |
|
| `log.Error(<string>)` | Log with the `error` log level. |
|
||||||
| `log.Progress(<float between 0 and 1>)` | Sets the progress of the plugin task, as a float, where `0` represents 0% and `1` represents 100%. |
|
| `log.Progress(<float between 0 and 1>)` | Sets the progress of the plugin task, as a float, where `0` represents 0% and `1` represents 100%. |
|
||||||
|
|
||||||
## GQL
|
### GQL
|
||||||
|
|
||||||
Stash provides the following API for communicating with stash using the graphql interface:
|
Stash provides the following API for communicating with stash using the graphql interface:
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ Stash provides the following API for communicating with stash using the graphql
|
|||||||
|--------|-------------|
|
|--------|-------------|
|
||||||
| `gql.Do(<query/mutation string>, <variables object>)` | Executes a graphql query/mutation on the stash server. Returns an object in the same way as a graphql query does. |
|
| `gql.Do(<query/mutation string>, <variables object>)` | Executes a graphql query/mutation on the stash server. Returns an object in the same way as a graphql query does. |
|
||||||
|
|
||||||
### Example
|
#### Example
|
||||||
|
|
||||||
```
|
```
|
||||||
// creates a tag
|
// creates a tag
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ External plugins may log to the stash server by writing to stderr. By default, d
|
|||||||
|
|
||||||
Plugins can log for specific levels or log progress by prefixing the output string with special control characters. See `pkg/plugin/common/log` for how this is done in go.
|
Plugins can log for specific levels or log progress by prefixing the output string with special control characters. See `pkg/plugin/common/log` for how this is done in go.
|
||||||
|
|
||||||
# Plugin configuration file format
|
## Plugin configuration file format
|
||||||
|
|
||||||
## exec
|
### exec
|
||||||
|
|
||||||
For external plugin tasks, the `exec` field is a list with the first element being the binary that will be executed, and the subsequent elements are the arguments passed. The execution process will search the path for the binary, then will attempt to find the program in the same directory as the plugin configuration file. The `exe` extension is not necessary on Windows systems.
|
For external plugin tasks, the `exec` field is a list with the first element being the binary that will be executed, and the subsequent elements are the arguments passed. The execution process will search the path for the binary, then will attempt to find the program in the same directory as the plugin configuration file. The `exe` extension is not necessary on Windows systems.
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ exec:
|
|||||||
- {pluginDir}/foo.py
|
- {pluginDir}/foo.py
|
||||||
```
|
```
|
||||||
|
|
||||||
## interface
|
### interface
|
||||||
|
|
||||||
For external plugin tasks, the `interface` field must be set to one of the following values:
|
For external plugin tasks, the `interface` field must be set to one of the following values:
|
||||||
* `rpc`
|
* `rpc`
|
||||||
@@ -65,11 +65,11 @@ See the `Plugin interfaces` section above for details on these interface types.
|
|||||||
|
|
||||||
The `interface` field defaults to `raw` if not provided.
|
The `interface` field defaults to `raw` if not provided.
|
||||||
|
|
||||||
## errLog
|
### errLog
|
||||||
|
|
||||||
The `errLog` field tells stash what the default log level should be when the plugin outputs to stderr without encoding a log level. It defaults to the `error` level if no provided. This field is not necessary if the plugin outputs logging with the appropriate encoding. See the `Logging` section above for details.
|
The `errLog` field tells stash what the default log level should be when the plugin outputs to stderr without encoding a log level. It defaults to the `error` level if no provided. This field is not necessary if the plugin outputs logging with the appropriate encoding. See the `Logging` section above for details.
|
||||||
|
|
||||||
# Task configuration
|
## Task configuration
|
||||||
|
|
||||||
In addition to the standard task configuration, external tasks may be configured with an optional `execArgs` field to add extra parameters to the execution arguments for the task.
|
In addition to the standard task configuration, external tasks may be configured with an optional `execArgs` field to add extra parameters to the execution arguments for the task.
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
Stash works by cataloging your media using the paths that you provide. Once you have [configured](/settings?tab=library) the locations where your media is stored, you can click the Scan button in [`Settings -> Tasks`](/settings?tab=tasks) and stash will begin scanning and importing your media into its library.
|
Stash works by cataloging your media using the paths that you provide. Once you have [configured](/settings?tab=library) the locations where your media is stored, you can click the Scan button in [`Settings -> Tasks`](/settings?tab=tasks) and stash will begin scanning and importing your media into its library.
|
||||||
|
|
||||||
For the best experience, it is recommmended that after a scan is finished, that video previews and sprites are generated. You can do this in [`Settings -> Tasks`](/settings?tab=tasks). Note that currently it is only possible to perform one task at a time and there is no task queue, so the Generate task should be performed after Scan is complete.
|
For the best experience, it is recommmended that after a scan is finished, that video previews and sprites are generated. You can do this in [`Settings -> Tasks`](/settings?tab=tasks). Note that currently it is only possible to perform one task at a time and but there is a task queue, so the generate tasks should be performed after scan is complete.
|
||||||
|
|
||||||
Once your media is imported, you are ready to begin creating Performers, Studios and Tags, and curating your content!
|
Once your media is imported, you are ready to begin creating Performers, Studios and Tags, and curating your content!
|
||||||
@@ -10,7 +10,7 @@ The metadata given to Stash can be exported into the JSON format. This structure
|
|||||||
* `studios`
|
* `studios`
|
||||||
* `movies`
|
* `movies`
|
||||||
|
|
||||||
# File naming
|
## File naming
|
||||||
|
|
||||||
When exported, files are named with different formats depending on the object type:
|
When exported, files are named with different formats depending on the object type:
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ When exported, files are named with different formats depending on the object ty
|
|||||||
|
|
||||||
Note that the file naming is not significant when importing. All json files will be read from the subdirectories.
|
Note that the file naming is not significant when importing. All json files will be read from the subdirectories.
|
||||||
|
|
||||||
# Content of the json files
|
## Content of the json files
|
||||||
|
|
||||||
In the following, the values of the according jsons will be shown. If the value should be a number, it is written with after comma values (like `29.98` or `50.0`), but still as a string. The meaning from most of them should be obvious due to the previous explanation or from the possible values stash offers when editing, otherwise a short comment will be added.
|
In the following, the values of the according jsons will be shown. If the value should be a number, it is written with after comma values (like `29.98` or `50.0`), but still as a string. The meaning from most of them should be obvious due to the previous explanation or from the possible values stash offers when editing, otherwise a short comment will be added.
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ Example:
|
|||||||
"created_at": "2019-05-03T21:36:58+01:00"
|
"created_at": "2019-05-03T21:36:58+01:00"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Performer
|
### Performer
|
||||||
```
|
```
|
||||||
name
|
name
|
||||||
url
|
url
|
||||||
@@ -68,7 +68,7 @@ rating (integer)
|
|||||||
details
|
details
|
||||||
```
|
```
|
||||||
|
|
||||||
## Studio
|
### Studio
|
||||||
```
|
```
|
||||||
name
|
name
|
||||||
url
|
url
|
||||||
@@ -79,7 +79,7 @@ rating (integer)
|
|||||||
details
|
details
|
||||||
```
|
```
|
||||||
|
|
||||||
## Scene
|
### Scene
|
||||||
```
|
```
|
||||||
title
|
title
|
||||||
studio
|
studio
|
||||||
@@ -110,7 +110,7 @@ updated_at
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Image
|
### Image
|
||||||
```
|
```
|
||||||
title
|
title
|
||||||
studio
|
studio
|
||||||
@@ -126,7 +126,7 @@ created_at
|
|||||||
updated_at
|
updated_at
|
||||||
```
|
```
|
||||||
|
|
||||||
## Gallery
|
### Gallery
|
||||||
```
|
```
|
||||||
title
|
title
|
||||||
studio
|
studio
|
||||||
@@ -209,11 +209,11 @@ created_at
|
|||||||
updated_at
|
updated_at
|
||||||
```
|
```
|
||||||
|
|
||||||
# In JSON format
|
## In JSON format
|
||||||
|
|
||||||
For those preferring the json-format, defined [here](https://json-schema.org/), the following format may be more interesting:
|
For those preferring the json-format, defined [here](https://json-schema.org/), the following format may be more interesting:
|
||||||
|
|
||||||
## performer.json
|
### performer.json
|
||||||
|
|
||||||
``` json
|
``` json
|
||||||
{
|
{
|
||||||
@@ -313,7 +313,7 @@ For those preferring the json-format, defined [here](https://json-schema.org/),
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## studio.json
|
### studio.json
|
||||||
|
|
||||||
``` json
|
``` json
|
||||||
{
|
{
|
||||||
@@ -352,7 +352,7 @@ For those preferring the json-format, defined [here](https://json-schema.org/),
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## scene.json
|
### scene.json
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ The source URL must return a yaml file containing all the available packages for
|
|||||||
|
|
||||||
Path can be a relative path to the zip file or an external URL.
|
Path can be a relative path to the zip file or an external URL.
|
||||||
|
|
||||||
# Adding plugins manually
|
## Adding plugins manually
|
||||||
|
|
||||||
By default, Stash looks for plugin configurations in the `plugins` sub-directory of the directory where the stash `config.yml` is read. This will either be the `$HOME/.stash` directory or the current working directory.
|
By default, Stash looks for plugin configurations in the `plugins` sub-directory of the directory where the stash `config.yml` is read. This will either be the `$HOME/.stash` directory or the current working directory.
|
||||||
|
|
||||||
@@ -54,13 +54,13 @@ Plugins are added by adding configuration yaml files (format: `pluginName.yml`)
|
|||||||
|
|
||||||
Loaded plugins can be viewed in the Plugins page of the Settings. After plugins are added, removed or edited while stash is running, they can be reloaded by clicking `Reload Plugins` button.
|
Loaded plugins can be viewed in the Plugins page of the Settings. After plugins are added, removed or edited while stash is running, they can be reloaded by clicking `Reload Plugins` button.
|
||||||
|
|
||||||
# Using plugins
|
## Using plugins
|
||||||
|
|
||||||
Plugins provide tasks which can be run from the Tasks page.
|
Plugins provide tasks which can be run from the Tasks page.
|
||||||
|
|
||||||
# Creating plugins
|
## Creating plugins
|
||||||
|
|
||||||
## Plugin configuration file format
|
### Plugin configuration file format
|
||||||
|
|
||||||
The basic structure of a plugin configuration file is as follows:
|
The basic structure of a plugin configuration file is as follows:
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ The `exec`, `interface`, `errLog` and `tasks` fields are used only for plugins w
|
|||||||
|
|
||||||
The `settings` field is used to display plugin settings on the plugins page. Plugin settings can also be set using the graphql mutation `configurePlugin` - the settings set this way do _not_ need to be specified in the `settings` field unless they are to be displayed in the stock plugin settings UI.
|
The `settings` field is used to display plugin settings on the plugins page. Plugin settings can also be set using the graphql mutation `configurePlugin` - the settings set this way do _not_ need to be specified in the `settings` field unless they are to be displayed in the stock plugin settings UI.
|
||||||
|
|
||||||
## UI Configuration
|
### UI Configuration
|
||||||
|
|
||||||
The `css` and `javascript` field values may be relative paths to the plugin configuration file, or
|
The `css` and `javascript` field values may be relative paths to the plugin configuration file, or
|
||||||
may be full external URLs.
|
may be full external URLs.
|
||||||
@@ -156,7 +156,7 @@ See [External Plugins](/help/ExternalPlugins.md) for details for making plugins
|
|||||||
|
|
||||||
See [Embedded Plugins](/help/EmbeddedPlugins.md) for details for making plugins with embedded tasks.
|
See [Embedded Plugins](/help/EmbeddedPlugins.md) for details for making plugins with embedded tasks.
|
||||||
|
|
||||||
## Plugin task input
|
### Plugin task input
|
||||||
|
|
||||||
Plugin tasks may accept an input from the stash server. This input is encoded according to the interface, and has the following structure (presented here in JSON format):
|
Plugin tasks may accept an input from the stash server. This input is encoded according to the interface, and has the following structure (presented here in JSON format):
|
||||||
```
|
```
|
||||||
@@ -189,7 +189,7 @@ Plugin tasks may accept an input from the stash server. This input is encoded ac
|
|||||||
|
|
||||||
The `server_connection` field contains all the information needed for a plugin to access the parent stash server, if necessary.
|
The `server_connection` field contains all the information needed for a plugin to access the parent stash server, if necessary.
|
||||||
|
|
||||||
## Plugin task output
|
### Plugin task output
|
||||||
|
|
||||||
Plugin task output is expected in the following structure (presented here as JSON format):
|
Plugin task output is expected in the following structure (presented here as JSON format):
|
||||||
|
|
||||||
@@ -202,7 +202,7 @@ Plugin task output is expected in the following structure (presented here as JSO
|
|||||||
|
|
||||||
The `error` field is logged in stash at the `error` log level if present. The `output` is written at the `debug` log level.
|
The `error` field is logged in stash at the `error` log level if present. The `output` is written at the `debug` log level.
|
||||||
|
|
||||||
## Task configuration
|
### Task configuration
|
||||||
|
|
||||||
Tasks are configured using the following structure:
|
Tasks are configured using the following structure:
|
||||||
|
|
||||||
@@ -218,7 +218,7 @@ A plugin configuration may contain multiple tasks.
|
|||||||
|
|
||||||
The `defaultArgs` field is used to add inputs to the plugin input sent to the plugin.
|
The `defaultArgs` field is used to add inputs to the plugin input sent to the plugin.
|
||||||
|
|
||||||
## Hook configuration
|
### Hook configuration
|
||||||
|
|
||||||
Stash supports executing plugin operations via triggering of a hook during a stash operation.
|
Stash supports executing plugin operations via triggering of a hook during a stash operation.
|
||||||
|
|
||||||
@@ -236,14 +236,14 @@ hooks:
|
|||||||
|
|
||||||
**Note:** it is possible for hooks to trigger eachother or themselves if they perform mutations. For safety, hooks will not be triggered if they have already been triggered in the context of the operation. Stash uses cookies to track this context, so it's important for plugins to send cookies when performing operations.
|
**Note:** it is possible for hooks to trigger eachother or themselves if they perform mutations. For safety, hooks will not be triggered if they have already been triggered in the context of the operation. Stash uses cookies to track this context, so it's important for plugins to send cookies when performing operations.
|
||||||
|
|
||||||
### Trigger types
|
#### Trigger types
|
||||||
|
|
||||||
Trigger types use the following format:
|
Trigger types use the following format: `<object type>.<operation>.<hook type>`
|
||||||
`<object type>.<operation>.<hook type>`
|
|
||||||
|
|
||||||
For example, a post-hook on a scene create operation will be `Scene.Create.Post`.
|
For example, a post-hook on a scene create operation will be `Scene.Create.Post`.
|
||||||
|
|
||||||
The following object types are supported:
|
The following object types are supported:
|
||||||
|
|
||||||
* `Scene`
|
* `Scene`
|
||||||
* `SceneMarker`
|
* `SceneMarker`
|
||||||
* `Image`
|
* `Image`
|
||||||
@@ -254,6 +254,7 @@ The following object types are supported:
|
|||||||
* `Tag`
|
* `Tag`
|
||||||
|
|
||||||
The following operations are supported:
|
The following operations are supported:
|
||||||
|
|
||||||
* `Create`
|
* `Create`
|
||||||
* `Update`
|
* `Update`
|
||||||
* `Destroy`
|
* `Destroy`
|
||||||
@@ -261,7 +262,7 @@ The following operations are supported:
|
|||||||
|
|
||||||
Currently, only `Post` hook types are supported. These are executed after the operation has completed and the transaction is committed.
|
Currently, only `Post` hook types are supported. These are executed after the operation has completed and the transaction is committed.
|
||||||
|
|
||||||
### Hook input
|
#### Hook input
|
||||||
|
|
||||||
Plugin tasks triggered by a hook include an argument named `hookContext` in the `args` object structure. The `hookContext` is structured as follows:
|
Plugin tasks triggered by a hook include an argument named `hookContext` in the `args` object structure. The `hookContext` is structured as follows:
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ The following partial date fields are also supported. The date will only be set
|
|||||||
|`dd`|Two digit date|
|
|`dd`|Two digit date|
|
||||||
|
|
||||||
The following full date fields are supported, using the same partial date rules as above:
|
The following full date fields are supported, using the same partial date rules as above:
|
||||||
|
|
||||||
* `yyyymmdd`
|
* `yyyymmdd`
|
||||||
* `yymmdd`
|
* `yymmdd`
|
||||||
* `ddmmyyyy`
|
* `ddmmyyyy`
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Scrapers can be contributed to the community by creating a PR in [this repository](https://github.com/stashapp/CommunityScrapers/pulls).
|
Scrapers can be contributed to the community by creating a PR in [this repository](https://github.com/stashapp/CommunityScrapers/pulls).
|
||||||
|
|
||||||
# Scraper configuration file format
|
## Scraper configuration file format
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: <site>
|
name: <site>
|
||||||
@@ -166,7 +166,6 @@ sceneByURL:
|
|||||||
The above configuration requires that `sceneScraper` exists in the `xPathScrapers` configuration.
|
The above configuration requires that `sceneScraper` exists in the `xPathScrapers` configuration.
|
||||||
|
|
||||||
XPath scraping configurations specify the mapping between object fields and an xpath selector. The xpath scraper scrapes the applicable URL and uses xpath to populate the object fields.
|
XPath scraping configurations specify the mapping between object fields and an xpath selector. The xpath scraper scrapes the applicable URL and uses xpath to populate the object fields.
|
||||||
>
|
|
||||||
|
|
||||||
### scrapeJson
|
### scrapeJson
|
||||||
|
|
||||||
@@ -202,6 +201,7 @@ xPathScrapers:
|
|||||||
### scrapeXPath and scrapeJson use with `sceneByFragment` and `sceneByQueryFragment`
|
### scrapeXPath and scrapeJson use with `sceneByFragment` and `sceneByQueryFragment`
|
||||||
|
|
||||||
For `sceneByFragment` and `sceneByQueryFragment`, the `queryURL` field must also be present. This field is used to build a query URL for scenes. For `sceneByFragment`, the `queryURL` field supports the following placeholder fields:
|
For `sceneByFragment` and `sceneByQueryFragment`, the `queryURL` field must also be present. This field is used to build a query URL for scenes. For `sceneByFragment`, the `queryURL` field supports the following placeholder fields:
|
||||||
|
|
||||||
* `{checksum}` - the MD5 checksum of the scene
|
* `{checksum}` - the MD5 checksum of the scene
|
||||||
* `{oshash}` - the oshash of the scene
|
* `{oshash}` - the oshash of the scene
|
||||||
* `{filename}` - the base filename of the scene
|
* `{filename}` - the base filename of the scene
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ Stash supports scraping of metadata from various external sources.
|
|||||||
| performer | | ✔️ | ✔️ |
|
| performer | | ✔️ | ✔️ |
|
||||||
| scene | ✔️ | ✔️ | ✔️ |
|
| scene | ✔️ | ✔️ | ✔️ |
|
||||||
|
|
||||||
# Scraper Operation
|
|
||||||
|
|
||||||
## Included Scrapers
|
## Included Scrapers
|
||||||
|
|
||||||
Stash provides the following built-in scrapers:
|
Stash provides the following built-in scrapers:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Stash can be integrated with stash-box which acts as a centralized metadata database. This is in the early stages of development but can be used for fingerprint/keyword lookups and automated tagging of performers and scenes. The batch tagging interface can be accessed from the [scene view](/scenes?disp=3). For more information join our [Discord](https://discord.gg/2TsNFKt).
|
Stash can be integrated with stash-box which acts as a centralized metadata database. This is in the early stages of development but can be used for fingerprint/keyword lookups and automated tagging of performers and scenes. The batch tagging interface can be accessed from the [scene view](/scenes?disp=3). For more information join our [Discord](https://discord.gg/2TsNFKt).
|
||||||
|
|
||||||
#### Searching
|
## Searching
|
||||||
|
|
||||||
The fingerprint search matches your current selection of files against the remote stash-box instance. Any scenes with a matching fingerprint will be returned, although there is currently no validation of fingerprints so it’s recommended to double-check the validity before saving.
|
The fingerprint search matches your current selection of files against the remote stash-box instance. Any scenes with a matching fingerprint will be returned, although there is currently no validation of fingerprints so it’s recommended to double-check the validity before saving.
|
||||||
|
|
||||||
@@ -10,12 +10,12 @@ If no fingerprint match is found it’s possible to search by keywords. The
|
|||||||
|
|
||||||
An important thing to note is that it only returns a match *if all query terms are a match*. As an example, if a scene is titled `"A Trip to the Mall"` with the performer `"Jane Doe"`, a search for `"Trip to the Mall 1080p"` will *not* match, however `"trip mall doe"` would. Usually a few pieces of info is enough, for instance performer name + release date or studio name. To avoid common non-related keywords you can add them to the blacklist in the tagger config. Any items in the blacklist are stripped out of the query.
|
An important thing to note is that it only returns a match *if all query terms are a match*. As an example, if a scene is titled `"A Trip to the Mall"` with the performer `"Jane Doe"`, a search for `"Trip to the Mall 1080p"` will *not* match, however `"trip mall doe"` would. Usually a few pieces of info is enough, for instance performer name + release date or studio name. To avoid common non-related keywords you can add them to the blacklist in the tagger config. Any items in the blacklist are stripped out of the query.
|
||||||
|
|
||||||
#### Saving
|
## Saving
|
||||||
When a scene is matched stash will try to match the studio and performers against your local studios and performers. If you have previously matched them, they will automatically be selected. If not you either have to select the correct performer/studio from the dropdown, choose create to create a new entity, or skip to ignore it.
|
When a scene is matched stash will try to match the studio and performers against your local studios and performers. If you have previously matched them, they will automatically be selected. If not you either have to select the correct performer/studio from the dropdown, choose create to create a new entity, or skip to ignore it.
|
||||||
|
|
||||||
Once a scene is saved the scene and the matched studio/performers will have the `stash_id` saved which will then be used for future tagging.
|
Once a scene is saved the scene and the matched studio/performers will have the `stash_id` saved which will then be used for future tagging.
|
||||||
|
|
||||||
By default male performers are not shown, this can be enabled in the tagger config. Likewise scene tags are by default not saved. They can be set to either merge with existing tags on the scene, or overwrite them. It is not recommended to set tags currently since they are hard to deduplicate and can litter your data.
|
By default male performers are not shown, this can be enabled in the tagger config. Likewise scene tags are by default not saved. They can be set to either merge with existing tags on the scene, or overwrite them. It is not recommended to set tags currently since they are hard to deduplicate and can litter your data.
|
||||||
|
|
||||||
#### Submitting fingerprints
|
## Submitting fingerprints
|
||||||
After a scene is saved you will prompted to submit the fingerprint back to the stash-box instance. This is optional, but can be helpful for other users who have an identical copy who will then be able to match via the fingerprint search. No other information than the `stash_id` and file fingerprint is submitted.
|
After a scene is saved you will prompted to submit the fingerprint back to the stash-box instance. This is optional, but can be helpful for other users who have an identical copy who will then be able to match via the fingerprint search. No other information than the `stash_id` and file fingerprint is submitted.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
This page allows you to direct the stash server to perform a variety of tasks.
|
This page allows you to direct the stash server to perform a variety of tasks.
|
||||||
|
|
||||||
# Scanning
|
## Scanning
|
||||||
|
|
||||||
The scan function walks through the stash directories you have configured for new and moved files.
|
The scan function walks through the stash directories you have configured for new and moved files.
|
||||||
|
|
||||||
@@ -22,15 +22,16 @@ The scan task accepts the following options:
|
|||||||
| Generate thumbnails for images | Generates thumbnails for image files. |
|
| Generate thumbnails for images | Generates thumbnails for image files. |
|
||||||
| Generate previews for image clips | Generates a gif/looping video as thumbnail for image clips/gifs. |
|
| Generate previews for image clips | Generates a gif/looping video as thumbnail for image clips/gifs. |
|
||||||
|
|
||||||
# Auto Tagging
|
## Auto Tagging
|
||||||
See the [Auto Tagging](/help/AutoTagging.md) page.
|
See the [Auto Tagging](/help/AutoTagging.md) page.
|
||||||
|
|
||||||
# Scene Filename Parser
|
## Scene Filename Parser
|
||||||
See the [Scene Filename Parser](/help/SceneFilenameParser.md) page.
|
See the [Scene Filename Parser](/help/SceneFilenameParser.md) page.
|
||||||
|
|
||||||
# Generated Content
|
## Generated Content
|
||||||
|
|
||||||
The scanning function automatically generates a screenshot of each scene. The generated content provides the following:
|
The scanning function automatically generates a screenshot of each scene. The generated content provides the following:
|
||||||
|
|
||||||
* Video or image previews that are played when mousing over the scene card
|
* Video or image previews that are played when mousing over the scene card
|
||||||
* Perceptual hashes - helps match against StashDB, and feeds the duplicate finder
|
* Perceptual hashes - helps match against StashDB, and feeds the duplicate finder
|
||||||
* Sprites (scene stills for parts of each scene) that are shown in the scene scrubber
|
* Sprites (scene stills for parts of each scene) that are shown in the scene scrubber
|
||||||
@@ -55,28 +56,26 @@ The generate task accepts the following options:
|
|||||||
| Image Clip Previews | Generates a gif/looping video as thumbnail for image clips/gifs. |
|
| Image Clip Previews | Generates a gif/looping video as thumbnail for image clips/gifs. |
|
||||||
| Overwrite existing generated files | By default, where a generated file exists, it is not regenerated. When this flag is enabled, then the generated files are regenerated. |
|
| Overwrite existing generated files | By default, where a generated file exists, it is not regenerated. When this flag is enabled, then the generated files are regenerated. |
|
||||||
|
|
||||||
## Transcodes
|
### Transcodes
|
||||||
|
|
||||||
Web browsers support a limited number of video and audio codecs and containers. Stash will directly stream video files where the browser supports the codecs and container. Originally, stash did not support viewing scene videos where the browser did not support the codecs/container, and generating transcodes was a way of viewing these files.
|
Web browsers support a limited number of video and audio codecs and containers. Stash will directly stream video files where the browser supports the codecs and container. Originally, stash did not support viewing scene videos where the browser did not support the codecs/container, and generating transcodes was a way of viewing these files.
|
||||||
|
|
||||||
Stash has since implemented live transcoding, so transcodes are essentially unnecessary now. Further, transcodes use up a significant amount of disk space and are not guaranteed to be lossless.
|
Stash has since implemented live transcoding, so transcodes are essentially unnecessary now. Further, transcodes use up a significant amount of disk space and are not guaranteed to be lossless.
|
||||||
|
|
||||||
## Image gallery thumbnails
|
### Image gallery thumbnails
|
||||||
|
|
||||||
These are generated when the gallery is first viewed, so generating them beforehand is not necessary.
|
These are generated when the gallery is first viewed, so generating them beforehand is not necessary.
|
||||||
|
|
||||||
# Cleaning
|
## Cleaning
|
||||||
|
|
||||||
This task will walk through your configured media directories and remove any scene from the database that can no longer be found. It will also remove generated files for scenes that subsequently no longer exist.
|
This task will walk through your configured media directories and remove any scene from the database that can no longer be found. It will also remove generated files for scenes that subsequently no longer exist.
|
||||||
|
|
||||||
Care should be taken with this task, especially where the configured media directories may be inaccessible due to network issues.
|
Care should be taken with this task, especially where the configured media directories may be inaccessible due to network issues.
|
||||||
|
|
||||||
# Exporting and Importing
|
## Exporting and Importing
|
||||||
|
|
||||||
The import and export tasks read and write JSON files to the configured metadata directory. Import from file will merge your database with a file.
|
The import and export tasks read and write JSON files to the configured metadata directory. Import from file will merge your database with a file.
|
||||||
|
|
||||||
> **⚠️ Note:** The full import task wipes the current database completely before importing.
|
> **⚠️ Note:** The full import task wipes the current database completely before importing.
|
||||||
|
|
||||||
See the [JSON Specification](/help/JSONSpec.md) page for details on the exported JSON format.
|
See the [JSON Specification](/help/JSONSpec.md) page for details on the exported JSON format.
|
||||||
|
|
||||||
---
|
|
||||||
|
|||||||
Reference in New Issue
Block a user