From f35b7470ab1702b96c3c8d6fa1cc7d7965d3ef06 Mon Sep 17 00:00:00 2001 From: Belley Date: Mon, 12 Jul 2021 12:10:10 +0200 Subject: [PATCH] Update renamerOnUpdate.py (#7) --- plugins/renamerOnUpdate/renamerOnUpdate.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/renamerOnUpdate/renamerOnUpdate.py b/plugins/renamerOnUpdate/renamerOnUpdate.py index 9baa25e..ecdcf24 100644 --- a/plugins/renamerOnUpdate/renamerOnUpdate.py +++ b/plugins/renamerOnUpdate/renamerOnUpdate.py @@ -479,9 +479,11 @@ if (os.path.isfile(current_path) == True): f.write("{}|{}|{}\n".format(FRAGMENT_SCENE_ID, current_path, new_path)) f.close() else: - log.LogWarning("[OS] File failed to rename ? {}".format(new_path)) + log.LogError("[OS] File failed to rename ? {}".format(new_path)) + sys.exit(1) else: - log.LogWarning("[OS] File don't exist in your Disk/Drive ({})".format(current_path)) + log.LogError("[OS] File don't exist in your Disk/Drive ({})".format(current_path)) + sys.exit(1) # Database rename cursor.execute("UPDATE scenes SET path=? WHERE id=?;", [new_path, FRAGMENT_SCENE_ID]) @@ -492,3 +494,5 @@ sqliteConnection.close() log.LogInfo("[SQLITE] Database updated!") print("{'output':'Hook 'Update' Plugin finished.'}\n") + +# Last Updated July 02, 2021