Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion plugins/renamerOnUpdate/renamerOnUpdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,10 @@ def renamer(scene_id, db_conn=None):
while err and scene_information['file_index']<=len(DUPLICATE_SUFFIX):
log.LogDebug("Duplicate filename detected, increasing file index")
scene_information['file_index'] = scene_information['file_index'] + 1
scene_information['new_filename'] = create_new_filename(scene_information, template["filename"])
if template["filename"]:
scene_information['new_filename'] = create_new_filename(scene_information, template["filename"])
else:
scene_information['new_filename'] = create_new_filename(scene_information, scene_information['current_filename'])
scene_information['final_path'] = os.path.join(scene_information['new_directory'], scene_information['new_filename'])
log.LogDebug(f"[NEW filename] {scene_information['new_filename']}")
log.LogDebug(f"[NEW path] {scene_information['final_path']}")
Expand Down
2 changes: 1 addition & 1 deletion plugins/renamerOnUpdate/renamerOnUpdate.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: renamerOnUpdate
description: Rename/move filename based on a template.
url: https://github.com/stashapp/CommunityScripts
version: 2.4.4
version: 2.4.5
exec:
- python
- "{pluginDir}/renamerOnUpdate.py"
Expand Down