forked from Github/Axter-Stash
fix bug in filemonitor_config
This commit is contained in:
@@ -693,12 +693,12 @@ def writeRowToHtmlReport(fileHtmlReport, DupFile, DupFileToKeep, itemIndex, tagD
|
|||||||
dupFileExist = True if os.path.isfile(DupFile['files'][0]['path']) else False
|
dupFileExist = True if os.path.isfile(DupFile['files'][0]['path']) else False
|
||||||
toKeepFileExist = True if os.path.isfile(DupFileToKeep['files'][0]['path']) else False
|
toKeepFileExist = True if os.path.isfile(DupFileToKeep['files'][0]['path']) else False
|
||||||
fileHtmlReport.write(f"{htmlReportTableRow}")
|
fileHtmlReport.write(f"{htmlReportTableRow}")
|
||||||
videoPreview = f"<video {htmlReportVideoPreview} poster=\"{DupFile['paths']['screenshot']}\"><source src=\"{DupFile['paths'][htmlPreviewOrStream]}\" type=\"video/mp4\"></video>"
|
videoPreview = f"<video class=\"ID_{DupFile['id']}_preview\" {htmlReportVideoPreview} poster=\"{DupFile['paths']['screenshot']}\"><source src=\"{DupFile['paths'][htmlPreviewOrStream]}\" type=\"video/mp4\"></video>"
|
||||||
if htmlIncludeImagePreview:
|
if htmlIncludeImagePreview:
|
||||||
spanPreviewImage = ""
|
spanPreviewImage = ""
|
||||||
if htmlImagePreviewPopupEnable:
|
if htmlImagePreviewPopupEnable:
|
||||||
spanPreviewImage = f"<span class=\"large\"><img src=\"{DupFile['paths']['sprite']}\" class=\"large-image\" alt=\"\" width=\"{htmlImagePreviewPopupSize}\"></span>"
|
spanPreviewImage = f"<span class=\"large\"><img class=\"ID_{DupFile['id']}_preview\" src=\"{DupFile['paths']['sprite']}\" class=\"large-image\" alt=\"\" width=\"{htmlImagePreviewPopupSize}\"></span>"
|
||||||
imagePreview = f"<ul><li><img src=\"{DupFile['paths']['sprite']}\" alt=\"\" width=\"{htmlImagePreviewSize}\">{spanPreviewImage}</li></ul>"
|
imagePreview = f"<ul><li><img class=\"ID_{DupFile['id']}_preview\" src=\"{DupFile['paths']['sprite']}\" alt=\"\" width=\"{htmlImagePreviewSize}\">{spanPreviewImage}</li></ul>"
|
||||||
if htmlIncludeVideoPreview:
|
if htmlIncludeVideoPreview:
|
||||||
fileHtmlReport.write(f"{getSceneID(DupFile)}<table><tr><td>{videoPreview}</td><td>{imagePreview}</td></tr></table></td>")
|
fileHtmlReport.write(f"{getSceneID(DupFile)}<table><tr><td>{videoPreview}</td><td>{imagePreview}</td></tr></table></td>")
|
||||||
else:
|
else:
|
||||||
@@ -846,12 +846,12 @@ def writeRowToHtmlReport(fileHtmlReport, DupFile, DupFileToKeep, itemIndex, tagD
|
|||||||
fileHtmlReport.write("</p></td>")
|
fileHtmlReport.write("</p></td>")
|
||||||
# ///////////////////////////////
|
# ///////////////////////////////
|
||||||
|
|
||||||
videoPreview = f"<video {htmlReportVideoPreview} poster=\"{DupFileToKeep['paths']['screenshot']}\"><source src=\"{DupFileToKeep['paths'][htmlPreviewOrStream]}\" type=\"video/mp4\"></video>"
|
videoPreview = f"<video class=\"ID_{DupFileToKeep['id']}_preview\" {htmlReportVideoPreview} poster=\"{DupFileToKeep['paths']['screenshot']}\"><source src=\"{DupFileToKeep['paths'][htmlPreviewOrStream]}\" type=\"video/mp4\"></video>"
|
||||||
if htmlIncludeImagePreview:
|
if htmlIncludeImagePreview:
|
||||||
spanPreviewImage = ""
|
spanPreviewImage = ""
|
||||||
if htmlImagePreviewPopupEnable:
|
if htmlImagePreviewPopupEnable:
|
||||||
spanPreviewImage = f"<span class=\"large\"><img src=\"{DupFileToKeep['paths']['sprite']}\" class=\"large-image\" alt=\"\" width=\"{htmlImagePreviewPopupSize}\"></span>"
|
spanPreviewImage = f"<span class=\"large\"><img class=\"ID_{DupFileToKeep['id']}_preview\" src=\"{DupFileToKeep['paths']['sprite']}\" class=\"large-image\" alt=\"\" width=\"{htmlImagePreviewPopupSize}\"></span>"
|
||||||
imagePreview = f"<ul><li><img src=\"{DupFileToKeep['paths']['sprite']}\" alt=\"\" width=\"{htmlImagePreviewSize}\">{spanPreviewImage}</li></ul>"
|
imagePreview = f"<ul><li><img class=\"ID_{DupFileToKeep['id']}_preview\" src=\"{DupFileToKeep['paths']['sprite']}\" alt=\"\" width=\"{htmlImagePreviewSize}\">{spanPreviewImage}</li></ul>"
|
||||||
if htmlIncludeVideoPreview:
|
if htmlIncludeVideoPreview:
|
||||||
fileHtmlReport.write(f"{getSceneID(DupFileToKeep)}<table><tr><td>{videoPreview}</td><td>{imagePreview}</td></tr></table></td>")
|
fileHtmlReport.write(f"{getSceneID(DupFileToKeep)}<table><tr><td>{videoPreview}</td><td>{imagePreview}</td></tr></table></td>")
|
||||||
else:
|
else:
|
||||||
@@ -2021,6 +2021,7 @@ def deleteScene(disableInReport=True, deleteFile=True, scene=None, writeToStdOut
|
|||||||
modifyPropertyToSceneClassToAllFiles(scene, "remove highlight")
|
modifyPropertyToSceneClassToAllFiles(scene, "remove highlight")
|
||||||
modifyPropertyToSceneClassToAllFiles(scene, "{background-color:" + deleteSceneFlagBgColor + ";pointer-events:none;}", button_property)
|
modifyPropertyToSceneClassToAllFiles(scene, "{background-color:" + deleteSceneFlagBgColor + ";pointer-events:none;}", button_property)
|
||||||
updateDuplicateCandidateForDeletionList(scene, removeScene = True)
|
updateDuplicateCandidateForDeletionList(scene, removeScene = True)
|
||||||
|
modifyPropertyToSceneClassToAllFiles(f"{scene}_preview", "{display:none;}")
|
||||||
if writeToStdOut:
|
if writeToStdOut:
|
||||||
stash.Log(f"{stash.PLUGIN_TASK_NAME} complete for scene {scene} with results = {result}")
|
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}'" + "}")
|
sys.stdout.write("{" + f"{stash.PLUGIN_TASK_NAME} : 'complete', id: '{scene}', result: '{result}'" + "}")
|
||||||
|
|||||||
@@ -882,6 +882,9 @@ class StashPluginHelper(StashInterface):
|
|||||||
return True
|
return True
|
||||||
return False
|
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.
|
# Functions which are candidates to be added to parent class use snake_case naming convention.
|
||||||
# ############################################################################################################
|
# ############################################################################################################
|
||||||
|
|||||||
@@ -882,6 +882,9 @@ class StashPluginHelper(StashInterface):
|
|||||||
return True
|
return True
|
||||||
return False
|
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.
|
# Functions which are candidates to be added to parent class use snake_case naming convention.
|
||||||
# ############################################################################################################
|
# ############################################################################################################
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ config = {
|
|||||||
# Enable to delete special file immediately after it's created in stop process.
|
# Enable to delete special file immediately after it's created in stop process.
|
||||||
"deleteSpecFileInStop": False,
|
"deleteSpecFileInStop": False,
|
||||||
# Docker notification from host machine
|
# 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.
|
# # A simple basic example with only one bind mount path.
|
||||||
# {"GQL":"http://localhost:9995", "apiKey":"", "bindMounts":[{r"C:\Video":"/mnt/Video"}]},
|
# {"GQL":"http://localhost:9995", "apiKey":"", "bindMounts":[{r"C:\Video":"/mnt/Video"}]},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user