diff --git a/plugins/DupFileManager/DupFileManager.py b/plugins/DupFileManager/DupFileManager.py index 8225fbd..4710d48 100644 --- a/plugins/DupFileManager/DupFileManager.py +++ b/plugins/DupFileManager/DupFileManager.py @@ -564,14 +564,16 @@ def mangeDupFiles(merge=False, deleteDup=False, tagDuplicates=False, deleteBlack stash.Trace(f"duplicateMarkForDeletion = {duplicateMarkForDeletion}") dupTagId = stash.createTagId(duplicateMarkForDeletion, duplicateMarkForDeletion_descp, ignoreAutoTag=True) stash.Trace(f"dupTagId={dupTagId} name={duplicateMarkForDeletion}") - createHtmlReport = stash.Setting('createHtmlReport') - previewOrStream = "stream" if stash.Setting('streamOverPreview') else "preview" - htmlReportNameHomePage = htmlReportName - htmlReportTableRow = stash.Setting('htmlReportTableRow') - htmlReportTableData = stash.Setting('htmlReportTableData') - htmlReportVideoPreview = stash.Setting('htmlReportVideoPreview') - htmlHighlightTimeDiff = stash.Setting('htmlHighlightTimeDiff') - htmlReportPaginate = stash.Setting('htmlReportPaginate') + createHtmlReport = stash.Setting('createHtmlReport') + previewOrStream = "stream" if stash.Setting('streamOverPreview') else "preview" + htmlIncludeImagePreview = stash.Setting('htmlIncludeImagePreview') + htmlImagePreviewPopupSize = stash.Setting('htmlImagePreviewPopupSize') + htmlReportNameHomePage = htmlReportName + htmlReportTableRow = stash.Setting('htmlReportTableRow') + htmlReportTableData = stash.Setting('htmlReportTableData') + htmlReportVideoPreview = stash.Setting('htmlReportVideoPreview') + htmlHighlightTimeDiff = stash.Setting('htmlHighlightTimeDiff') + htmlReportPaginate = stash.Setting('htmlReportPaginate') addDupWhitelistTag() addExcludeDupTag() @@ -594,7 +596,7 @@ def mangeDupFiles(merge=False, deleteDup=False, tagDuplicates=False, deleteBlack stash.Trace("#########################################################################") stash.Log(f"Waiting for find_duplicate_scenes_diff to return results; matchDupDistance={matchPhaseDistanceText}; significantTimeDiff={significantTimeDiff}", printTo=LOG_STASH_N_PLUGIN) stash.startSpinningProcessBar() - htmlFileData = " paths {screenshot " + previewOrStream + "} " if createHtmlReport else "" + htmlFileData = " paths {screenshot sprite " + previewOrStream + "} " if createHtmlReport else "" mergeFieldData = " code director title rating100 date studio {id} movies {movie {id} } galleries {id} performers {id} urls " if merge else "" DupFileSets = stash.find_duplicate_scenes(matchPhaseDistance, fragment='id tags {id name} files {path width height duration size video_codec bit_rate frame_rate} details ' + mergeFieldData + htmlFileData) stash.stopSpinningProcessBar() @@ -759,8 +761,12 @@ def mangeDupFiles(merge=False, deleteDup=False, tagDuplicates=False, deleteBlack toKeepFileExist = True if os.path.isfile(DupFileToKeep['files'][0]['path']) else False fileHtmlReport.write(f"{htmlReportTableRow}") - - fileHtmlReport.write(f"{htmlReportTableData}") + videoPreview = f"" + if htmlIncludeImagePreview: + imagePreview = f"" + fileHtmlReport.write(f"{htmlReportTableData}
{videoPreview}{imagePreview}
") + else: + fileHtmlReport.write(f"{htmlReportTableData}{videoPreview}") fileHtmlReport.write(f"{htmlReportTableData}{getPath(DupFile)}") fileHtmlReport.write(f"

") fileHtmlReport.write(f"") @@ -800,7 +806,12 @@ def mangeDupFiles(merge=False, deleteDup=False, tagDuplicates=False, deleteBlack # Copy *file* from duplicate to ToKeep fileHtmlReport.write("

") - fileHtmlReport.write(f"{htmlReportTableData}") + videoPreview = f"" + if htmlIncludeImagePreview: + imagePreview = f"" + fileHtmlReport.write(f"{htmlReportTableData}
ResDurrationBitRateCodecFrameRatesizeIDindex
{DupFile['files'][0]['width']}x{DupFile['files'][0]['height']}{DupFile['files'][0]['duration']}{DupFile['files'][0]['bit_rate']}{DupFile['files'][0]['video_codec']}{DupFile['files'][0]['frame_rate']}{DupFile['files'][0]['size']}{DupFile['id']}{QtyTagForDel}
{videoPreview}{imagePreview}
") + else: + fileHtmlReport.write(f"{htmlReportTableData}{videoPreview}") fileHtmlReport.write(f"{htmlReportTableData}{getPath(DupFileToKeep)}") fileHtmlReport.write(f"

") fileHtmlReport.write(f"
ResDurrationBitRateCodecFrameRatesizeID
{DupFileToKeep['files'][0]['width']}x{DupFileToKeep['files'][0]['height']}{DupFileToKeep['files'][0]['duration']}{DupFileToKeep['files'][0]['bit_rate']}{DupFileToKeep['files'][0]['video_codec']}{DupFileToKeep['files'][0]['frame_rate']}{DupFileToKeep['files'][0]['size']}{DupFileToKeep['id']}
") diff --git a/plugins/DupFileManager/DupFileManager_config.py b/plugins/DupFileManager/DupFileManager_config.py index c7236f1..53020ea 100644 --- a/plugins/DupFileManager/DupFileManager_config.py +++ b/plugins/DupFileManager/DupFileManager_config.py @@ -82,6 +82,9 @@ config = { "createHtmlReport" : True, # If enabled, report displays stream instead of preview for video "streamOverPreview" : False, # This option works in Chrome, but does not work very well on firefox. + # If enabled, report displays an image preview similar to sceneDuplicateChecker + "htmlIncludeImagePreview" : False, + "htmlImagePreviewPopupSize" : 600, # Name of the HTML file to create "htmlReportName" : "DuplicateTagScenes.html", # HTML report prefix, before table listing @@ -115,6 +118,27 @@ table, th, td {border:1px solid black;} .link-button:active { color:red; } +ul { + display: flex; +} + +li { + list-style-type: none; + padding: 10px; + position: relative; +} +.large { + position: absolute; + left: -9999px; +} +li:hover .large { + left: 20px; + top: -150px; +} +.large-image { + border-radius: 4px; + box-shadow: 1px 1px 3px 3px rgba(127, 127, 127, 0.15);; +}