forked from Github/Axter-Stash
81 lines
4.3 KiB
YAML
81 lines
4.3 KiB
YAML
name: RenameFile
|
|
description: "Renames video (scene) file names when the user edits the [Title] field located in the scene [Edit] tab.
|
|
The file is renamed to the [Title] field value after user clicks save button.
|
|
Optionally, tags and performers can be appended to the file name when rename occurs.
|
|
Additional options available in file renamefile_settings.py.
|
|
Note: On Windows OS, the file can not be renamed while it's playing. Refresh the URL to allow file release and rename."
|
|
version: 0.2.5
|
|
url: https://github.com/David-Maisonave/Axter-Stash/tree/main/plugins/RenameFile
|
|
ui:
|
|
settings:
|
|
dryRun:
|
|
displayName: Dry Run
|
|
description: Enable to run script in [Dry Run] mode. In dry run mode, files are NOT renamed, and only logging is performed. Use the logging to determine if rename will occur as expected. This should always be enabled on the first run after renamefile_settings.py has been modified.
|
|
type: BOOLEAN
|
|
fileRenameViaMove:
|
|
displayName: Rename Using Move
|
|
description: Enable to have file moved when renaming file.
|
|
type: BOOLEAN
|
|
performerAppend:
|
|
displayName: Append Performers
|
|
description: Enable to append performers name to file name when renaming a file. Requires performers to be included in [Key Fields] list, which by default it is included.
|
|
type: BOOLEAN
|
|
performerIncludeInFileName:
|
|
displayName: Include Existing Performers
|
|
description: Enable to append performer even if performers name already exists in the original file name.
|
|
type: BOOLEAN
|
|
tagAppend:
|
|
displayName: Append Tags
|
|
description: Enable to append tag names to file name when renaming a file. Requires tags to be included in [Key Fields] list, which by default it is included.
|
|
type: BOOLEAN
|
|
tagIncludeInFileName:
|
|
displayName: Include Existing Tags
|
|
description: Enable to append tag name even if tag already exists in original file name.
|
|
type: BOOLEAN
|
|
zFieldKeyList:
|
|
displayName: Key Fields
|
|
description: "(Default=title,performers,tags) Define key fields to use to format the file name. This is a comma seperated list, and the list should be in the desired format order. For example, if the user wants the performers name before the title, set the performers name first. Example:\"performers,title,tags\". This is an example of user adding height:\"title,performers,tags,height\" Here's an example using all of the supported fields: \"title,performers,tags,studio,date,height,video_codec,frame_rate\"."
|
|
type: STRING
|
|
zgraphqlEndpoint: # Prefixing z_ to variable names so that the GUI will place these fields after above fields (alphabatically listed)
|
|
displayName: GraphQL Endpoint
|
|
description: (Default=http://localhost:9999/graphql). Update with your endpoint, or leave blank to use default.
|
|
type: STRING
|
|
zmaximumTagKeys:
|
|
displayName: Max Tag Keys
|
|
description: (Default=12) Maximum quantity of tag keys to append to file name. 0=Default(12); -1=No tags appended.
|
|
type: NUMBER
|
|
zpathToExclude:
|
|
displayName: Exclude Path
|
|
description: "Add path(s) to exclude from RenameFile. Example Usage: r\"/path/to/exclude1\" When entering multiple paths, use space. Example: r\"/path_1_to/exclude\" r\"/someOtherPath2Exclude\" r\"/yetAnotherPath\""
|
|
type: STRING
|
|
zseparators:
|
|
displayName: Separator
|
|
description: "(Default=-) Define the separator to use between different parts of the filename. Example Usage: \",\""
|
|
type: STRING
|
|
ztagWhitelist:
|
|
displayName: Tag Whitelist
|
|
description: "Define a whitelist of allowed tags or EMPTY to allow all tags. Example Usage: \"tag1\", \"tag2\", \"tag3\""
|
|
type: STRING
|
|
zzdebugTracing:
|
|
displayName: Debug Tracing
|
|
description: (Default=false) [***For Advanced Users***] Enable debug tracing. When enabled, additional tracing logging is added to Stash\plugins\RenameFile\renamefile.log
|
|
type: BOOLEAN
|
|
exec:
|
|
- python
|
|
- "{pluginDir}/renamefile.py"
|
|
interface: raw
|
|
hooks:
|
|
- name: RenameFiles
|
|
description: Renames scene files.
|
|
triggeredBy:
|
|
- Scene.Update.Post
|
|
tasks:
|
|
# - name: Fetch Tags
|
|
# description: Get tags from duplicate file names.
|
|
# defaultArgs:
|
|
# mode: fetch_dup_filename_tags
|
|
- name: Rename Last Scene
|
|
description: Renames file of last updated scene.
|
|
defaultArgs:
|
|
mode: rename_files_task
|