From def6234e60b33d51722bcfceab1a85b7fedbb43c Mon Sep 17 00:00:00 2001
From: David Maisonave <47364845+David-Maisonave@users.noreply.github.com>
Date: Fri, 10 Jan 2025 12:44:56 -0500
Subject: [PATCH] fix bug in filemonitor_config
---
plugins/DupFileManager/DupFileManager.py | 13 +++++++------
plugins/DupFileManager/StashPluginHelper.py | 3 +++
plugins/FileMonitor/StashPluginHelper.py | 3 +++
plugins/FileMonitor/filemonitor_config.py | 2 +-
4 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/plugins/DupFileManager/DupFileManager.py b/plugins/DupFileManager/DupFileManager.py
index c3ed1e0..ecdb08b 100644
--- a/plugins/DupFileManager/DupFileManager.py
+++ b/plugins/DupFileManager/DupFileManager.py
@@ -693,12 +693,12 @@ def writeRowToHtmlReport(fileHtmlReport, DupFile, DupFileToKeep, itemIndex, tagD
dupFileExist = True if os.path.isfile(DupFile['files'][0]['path']) else False
toKeepFileExist = True if os.path.isfile(DupFileToKeep['files'][0]['path']) else False
fileHtmlReport.write(f"{htmlReportTableRow}")
- videoPreview = f""
+ videoPreview = f""
if htmlIncludeImagePreview:
spanPreviewImage = ""
if htmlImagePreviewPopupEnable:
- spanPreviewImage = f"
"
- imagePreview = f"
{spanPreviewImage}
"
+ spanPreviewImage = f"
"
+ imagePreview = f"
{spanPreviewImage}
"
if htmlIncludeVideoPreview:
fileHtmlReport.write(f"{getSceneID(DupFile)}| {videoPreview} | {imagePreview} |
")
else:
@@ -846,12 +846,12 @@ def writeRowToHtmlReport(fileHtmlReport, DupFile, DupFileToKeep, itemIndex, tagD
fileHtmlReport.write("")
# ///////////////////////////////
- videoPreview = f""
+ videoPreview = f""
if htmlIncludeImagePreview:
spanPreviewImage = ""
if htmlImagePreviewPopupEnable:
- spanPreviewImage = f"
"
- imagePreview = f"
{spanPreviewImage}
"
+ spanPreviewImage = f"
"
+ imagePreview = f"
{spanPreviewImage}
"
if htmlIncludeVideoPreview:
fileHtmlReport.write(f"{getSceneID(DupFileToKeep)}| {videoPreview} | {imagePreview} |
")
else:
@@ -2021,6 +2021,7 @@ def deleteScene(disableInReport=True, deleteFile=True, scene=None, writeToStdOut
modifyPropertyToSceneClassToAllFiles(scene, "remove highlight")
modifyPropertyToSceneClassToAllFiles(scene, "{background-color:" + deleteSceneFlagBgColor + ";pointer-events:none;}", button_property)
updateDuplicateCandidateForDeletionList(scene, removeScene = True)
+ modifyPropertyToSceneClassToAllFiles(f"{scene}_preview", "{display:none;}")
if writeToStdOut:
stash.Log(f"{stash.PLUGIN_TASK_NAME} complete for scene {scene} with results = {result}")
sys.stdout.write("{" + f"{stash.PLUGIN_TASK_NAME} : 'complete', id: '{scene}', result: '{result}'" + "}")
diff --git a/plugins/DupFileManager/StashPluginHelper.py b/plugins/DupFileManager/StashPluginHelper.py
index 985d831..369b104 100644
--- a/plugins/DupFileManager/StashPluginHelper.py
+++ b/plugins/DupFileManager/StashPluginHelper.py
@@ -882,6 +882,9 @@ class StashPluginHelper(StashInterface):
return True
return False
+ def getNum(self, data):
+ return ''.join(filter(lambda i: i.isdigit(), data))
+
# ############################################################################################################
# Functions which are candidates to be added to parent class use snake_case naming convention.
# ############################################################################################################
diff --git a/plugins/FileMonitor/StashPluginHelper.py b/plugins/FileMonitor/StashPluginHelper.py
index 985d831..369b104 100644
--- a/plugins/FileMonitor/StashPluginHelper.py
+++ b/plugins/FileMonitor/StashPluginHelper.py
@@ -882,6 +882,9 @@ class StashPluginHelper(StashInterface):
return True
return False
+ def getNum(self, data):
+ return ''.join(filter(lambda i: i.isdigit(), data))
+
# ############################################################################################################
# Functions which are candidates to be added to parent class use snake_case naming convention.
# ############################################################################################################
diff --git a/plugins/FileMonitor/filemonitor_config.py b/plugins/FileMonitor/filemonitor_config.py
index 077b725..0f6ae8a 100644
--- a/plugins/FileMonitor/filemonitor_config.py
+++ b/plugins/FileMonitor/filemonitor_config.py
@@ -90,7 +90,7 @@ config = {
# Enable to delete special file immediately after it's created in stop process.
"deleteSpecFileInStop": False,
# Docker notification from host machine
- "dockers": # Example Stash Docker configurations. For more details see https://github.com/David-Maisonave/Axter-Stash/blob/main/plugins/FileMonitor#Multiple-Stash-Docker-Configuration[
+ "dockers": [ # Example Stash Docker configurations. For more details see https://github.com/David-Maisonave/Axter-Stash/blob/main/plugins/FileMonitor#Multiple-Stash-Docker-Configuration
# # A simple basic example with only one bind mount path.
# {"GQL":"http://localhost:9995", "apiKey":"", "bindMounts":[{r"C:\Video":"/mnt/Video"}]},