From 70144a24766cafe856984f6fca85b23811de75e3 Mon Sep 17 00:00:00 2001 From: David Maisonave <47364845+David-Maisonave@users.noreply.github.com> Date: Sat, 20 Jul 2024 02:18:22 -0400 Subject: [PATCH 1/5] Update README.md --- plugins/RenameFilename/README.md | 39 +++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/plugins/RenameFilename/README.md b/plugins/RenameFilename/README.md index 64df80c..1f8632e 100644 --- a/plugins/RenameFilename/README.md +++ b/plugins/RenameFilename/README.md @@ -1,14 +1,37 @@ # RenameFileName: +This is a Stash plugin which allows users to rename the video (scene) file name by editing the [Title] field located in the scene [Edit] tab. +In addition, the plugin also appends tags to the file name if the tag does not already exist in the name. + +Note: This script is **largely** based on the [Renamer](https://github.com/Serechops/Serechops-Stash/tree/main/plugins/Renamer) script. + +### Using RenameFileName +- Open a scene (via Stash), and click on the [**Edit**] tab. Populate the [**Title**] field with the desired file name. + - Note: Do **NOT** include the file folder name and do **NOT** include file extension. +- After populating the Title field, click the save button. +- After a few seconds, the file will get renamed and the screen will get updated with the new file name. +- By default tag names are appended to the file name if the tag is not already included in the file name. + - The [Tag Append] feature can be disabled in renamefilename_settings.py by adding "tags" to the exclude_keys field. +- Since this plugin is largely based on the [Renamer](https://github.com/Serechops/Serechops-Stash/tree/main/plugins/Renamer) plugin, it inherited some of its features, like being able to include any of the following fields when auto-renaming is executed: + - studio, performers, date, height, video_codec, frame_rate + - To add these fields removed the desired field(s) from **exclude_keys** in renamefilename_settings.py. + - To change the order, modify the **key_order** field. +**Note:** On Windows 10/11, the file can not be renamed while it's playing. It will result in following error: +` +Error: [WinError 32] The process cannot access the file because it is being used by another process +` +To avoid this error, refresh the URL before changing the Title field. + + +### Installation + + +Renames video (scene) file names when the user edits the [Title] field located in the scene [Edit] tab. +The file is renamed after user clicks save button. +Tags are appended to the file name if the tag does not already exist in the original file name.When you have installed the `RenameFileName` plugin, hop into your plugins directory, RenameFileName folder > open renamefilename_settings.py with your favorite code/text editor and you'll see this: +Features are configurable using the renamefilename_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. ### Requirements `pip install stashapp-tools` `pip install pyYAML` - -### Using RenameFileName -`*Note: Changes are made when a scene edit is saved.` -Renames video (scene) file names when the user edits the [Title] field located in the scene [Edit] tab. -The file is renamed after user clicks save button. -Tags are appended to the file name if the tag does not already exist in the original file name.When you have installed the `RenameFileName` plugin, hop into your plugins directory, RenameFileName folder > open renamefilename_settings.py with your favorite code/text editor and you'll see this: -Features are configurable using the renamefilename_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. \ No newline at end of file From fc692848f5dcb15e178532d3395d406d702d7fc6 Mon Sep 17 00:00:00 2001 From: David Maisonave <47364845+David-Maisonave@users.noreply.github.com> Date: Sat, 20 Jul 2024 02:25:21 -0400 Subject: [PATCH 2/5] Update README.md --- plugins/RenameFilename/README.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/plugins/RenameFilename/README.md b/plugins/RenameFilename/README.md index 1f8632e..fd6f6b4 100644 --- a/plugins/RenameFilename/README.md +++ b/plugins/RenameFilename/README.md @@ -9,12 +9,13 @@ Note: This script is **largely** based on the [Renamer](https://github.com/Serec - Note: Do **NOT** include the file folder name and do **NOT** include file extension. - After populating the Title field, click the save button. - After a few seconds, the file will get renamed and the screen will get updated with the new file name. -- By default tag names are appended to the file name if the tag is not already included in the file name. - - The [Tag Append] feature can be disabled in renamefilename_settings.py by adding "tags" to the exclude_keys field. +- By default tag names are appended to the file name if the tags do not exist in the file name. + - The [Tag Append] feature can be disabled by adding "tags" to the **exclude_keys** field in **renamefilename_settings.py** file. - Since this plugin is largely based on the [Renamer](https://github.com/Serechops/Serechops-Stash/tree/main/plugins/Renamer) plugin, it inherited some of its features, like being able to include any of the following fields when auto-renaming is executed: - studio, performers, date, height, video_codec, frame_rate - To add these fields removed the desired field(s) from **exclude_keys** in renamefilename_settings.py. - To change the order, modify the **key_order** field. + **Note:** On Windows 10/11, the file can not be renamed while it's playing. It will result in following error: ` Error: [WinError 32] The process cannot access the file because it is being used by another process @@ -25,11 +26,6 @@ To avoid this error, refresh the URL before changing the Title field. ### Installation -Renames video (scene) file names when the user edits the [Title] field located in the scene [Edit] tab. -The file is renamed after user clicks save button. -Tags are appended to the file name if the tag does not already exist in the original file name.When you have installed the `RenameFileName` plugin, hop into your plugins directory, RenameFileName folder > open renamefilename_settings.py with your favorite code/text editor and you'll see this: -Features are configurable using the renamefilename_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. ### Requirements From 07f7c7b6d2e79f2e0ee3708f8390fa3f1658a44f Mon Sep 17 00:00:00 2001 From: David Maisonave <47364845+David-Maisonave@users.noreply.github.com> Date: Sat, 20 Jul 2024 02:34:05 -0400 Subject: [PATCH 3/5] Update README.md --- plugins/RenameFilename/README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/plugins/RenameFilename/README.md b/plugins/RenameFilename/README.md index fd6f6b4..5e43550 100644 --- a/plugins/RenameFilename/README.md +++ b/plugins/RenameFilename/README.md @@ -22,12 +22,17 @@ Error: [WinError 32] The process cannot access the file because it is being used ` To avoid this error, refresh the URL before changing the Title field. - -### Installation - - - ### Requirements - `pip install stashapp-tools` `pip install pyYAML` + +### Installation +- Follow **Requirements** instructions. +- In the stash plugin directory (C:\Users\MyUserName\.stash\plugins), create a folder named **RenameFilename**. +- Copy all the plugin files to this folder.(**C:\Users\MyUserName\.stash\plugins\RenameFilename**). +- Restart Stash. + +That's it!!! + +### Options +To change options, see **renamefilename_settings.py** file. After making changes, go to http://localhost:9999/settings?tab=plugins, and click [Reload Plugins]. From 4057addf4e9819d95b97266d1f4f5df86bd52af3 Mon Sep 17 00:00:00 2001 From: David Maisonave <47364845+David-Maisonave@users.noreply.github.com> Date: Sat, 20 Jul 2024 02:34:27 -0400 Subject: [PATCH 4/5] Update README.md --- plugins/RenameFilename/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/RenameFilename/README.md b/plugins/RenameFilename/README.md index 5e43550..de4ca89 100644 --- a/plugins/RenameFilename/README.md +++ b/plugins/RenameFilename/README.md @@ -24,6 +24,7 @@ To avoid this error, refresh the URL before changing the Title field. ### Requirements `pip install stashapp-tools` + `pip install pyYAML` ### Installation From 852726b9beba64f2a7110b52eab88b0989926bcb Mon Sep 17 00:00:00 2001 From: David Maisonave <47364845+David-Maisonave@users.noreply.github.com> Date: Sat, 20 Jul 2024 03:04:26 -0400 Subject: [PATCH 5/5] Update README.md --- plugins/RenameFilename/README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/RenameFilename/README.md b/plugins/RenameFilename/README.md index de4ca89..5a180d7 100644 --- a/plugins/RenameFilename/README.md +++ b/plugins/RenameFilename/README.md @@ -1,5 +1,9 @@ # RenameFileName: -This is a Stash plugin which allows users to rename the video (scene) file name by editing the [Title] field located in the scene [Edit] tab. +RenameFileName is a [Stash](https://github.com/stashapp/stash) plugin which performs the following two main task. +- **Rename Scene File Name** (On-The-Fly) +- **Append tag names** to file name + +It allows users to rename the video (scene) file name by editing the [Title] field located in the scene [Edit] tab. In addition, the plugin also appends tags to the file name if the tag does not already exist in the name. Note: This script is **largely** based on the [Renamer](https://github.com/Serechops/Serechops-Stash/tree/main/plugins/Renamer) script. @@ -9,7 +13,7 @@ Note: This script is **largely** based on the [Renamer](https://github.com/Serec - Note: Do **NOT** include the file folder name and do **NOT** include file extension. - After populating the Title field, click the save button. - After a few seconds, the file will get renamed and the screen will get updated with the new file name. -- By default tag names are appended to the file name if the tags do not exist in the file name. +- By default tag names are appended to the file name only if the tags do not exist in the original name. - The [Tag Append] feature can be disabled by adding "tags" to the **exclude_keys** field in **renamefilename_settings.py** file. - Since this plugin is largely based on the [Renamer](https://github.com/Serechops/Serechops-Stash/tree/main/plugins/Renamer) plugin, it inherited some of its features, like being able to include any of the following fields when auto-renaming is executed: - studio, performers, date, height, video_codec, frame_rate