Hi, trying to get this to work, and am a bit confused that I keep getting this error:
[Plugin / Rename File on Update] GRAPHQL_ERROR:[‘moveFiles’] folder path /data/Vixen must be within a stash library path
I get this error even when I leave the default directory setting blank, so that it is actually not moving the file, just renaming in place
Edit: in case someone faces the same problem later. It was simply that in the stash Library setting I had entered “data” instead of “/data”. Took me a while to figure out, because I had to delete and re-add the library path to fix it - editing it didn’t do the trick.
I did discover another small problem however. For the re-naming, it removes illegal characters (colon:) in the file name, but it doesn’t remove it as expected in the file path
Attached with a fix for the illegal characters in name issue and also the oldpath issue. I vibe-coded this so use with caution, but seems to work
file_manager.py (8.0 KB)
I already made a pull request to fix illegal characters in the directory name. Check the github.
Tried looking through all the comments here and still get this error:
In the error below I changed the name of the file I was renaming to with the “file name format” I’m using in stash in case I typed something wrong there. Looks like though it doesn’t like the file extension mine is set as?
Info Scan finished (1.0922422s)
Error Scene.Update.Post [Rename File on Update]: returned error: exit status 1
Error [Plugin / Rename File on Update] Exception: 200 OK query failed. v0.30.1-0
Error [Plugin / Rename File on Update] raise Exception(error_msg)
Error [Plugin / Rename File on Update] File “C:\Users\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\stashapi\classes.py”, line 271, in _handle_GQL_response
Error [Plugin / Rename File on Update] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error [Plugin / Rename File on Update] return self._handle_GQL_response(response)
Error [Plugin / Rename File on Update] File “C:\Users\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\stashapi\classes.py”, line 228, in _GQL
Error [Plugin / Rename File on Update] ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error [Plugin / Rename File on Update] return self._GQL(query, variables)
Error [Plugin / Rename File on Update] File “C:\Users\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\stashapi\stashapp.py”, line 242, in call_GQL
Error [Plugin / Rename File on Update] ^^^^^^^^^^^^^^^^^^^^
Error [Plugin / Rename File on Update] moved_file = self.stash.call_GQL(
Error [Plugin / Rename File on Update] File “C:\Users.stash\plugins\rename-file-on-update\file_manager.py”, line 209, in rename_file
Error [Plugin / Rename File on Update] stash_file.rename_file()
Error [Plugin / Rename File on Update] File “C:\Users.stash\plugins\rename-file-on-update\renamer.py”, line 50, in rename_scene
Error [Plugin / Rename File on Update] rename_scene(stash, config, ARGS)
Error [Plugin / Rename File on Update] File “C:\Users.stash\plugins\rename-file-on-update/rename_file_on_update.py”, line 23, in
Error [Plugin / Rename File on Update] Traceback (most recent call last):
Error [Plugin / Rename File on Update] d
Error [Plugin / Rename File on Update] d
Error [Plugin / Rename File on Update] 200 OK query failed. v0.30.1-0
Error [Plugin / Rename File on Update] 200 OK GQL data response is null
Error [Plugin / Rename File on Update] GRAPHQL_ERROR:[‘moveFiles’] file extension for [$studio_name$] - $title$ - [$date$] [$video_codec$] [$width$p] is inconsistent with old filename oldtitle.mkv
Error moveFiles: input: moveFiles file extension for [$studio_name$] - $title$ - [$date$] [$video_codec$] [$width$p] is inconsistent with old filename old.mkv
Info [Plugin / Rename File on Update] Renaming file from X:\OtherTemp\old.mkv to X:\Other_Rename[$studio_name$] - $title$ - [$date$] [$video_codec$] [$width$p]
Info renaming X:\StashInfo\vtt\03c17d44919039df_sprite.jpg to X:\StashInfo\vtt\627e4081bf2f2e33_sprite.jpg
Info renaming X:\StashInfo\vtt\03c17d44919039df_thumbs.vtt to X:\StashInfo\vtt\627e4081bf2f2e33_thumbs.vtt
Info renaming X:\StashInfo\screenshots\03c17d44919039df.mp4 to X:\StashInfo\screenshots\627e4081bf2f2e33.mp4
Info Removing outdated checksum from X:\OtherTemp\old.mkv
Info Calculating fingerprints for X:\OtherTemp\old.mkv …
Info X:\OtherTemp\old.mkv has been updated: rescanning
Info Finished adding files to queue. 1 files queued
Info scanning 1 paths
Is it possible to designate a tag and only if that tag is present in the metadata add it to the renamed file name? I just want VR (LR, SBS, 180…) tags to be included in the file name no other tags.