forked from Github/Axter-Stash
Version 1.1.0
See version history for details on all the changes.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
name: DupFileManager
|
||||
description: Manages duplicate files.
|
||||
version: 1.0.1
|
||||
version: 1.1.0
|
||||
url: https://github.com/David-Maisonave/Axter-Stash/tree/main/plugins/DupFileManager
|
||||
ui:
|
||||
javascript:
|
||||
@@ -79,6 +79,10 @@ exec:
|
||||
- "{pluginDir}/DupFileManager.py"
|
||||
interface: raw
|
||||
tasks:
|
||||
- name: Create Duplicate Report
|
||||
description: Create a report listing duplicates, which can be viewed using Stash->Settings->Tools->[Duplicate File Report]
|
||||
defaultArgs:
|
||||
mode: create_duplicate_report_task
|
||||
- name: Tag Duplicates
|
||||
description: Set tag DuplicateMarkForDeletion to the duplicates with lower resolution, duration, file name length, or black list path.
|
||||
defaultArgs:
|
||||
|
||||
@@ -7,11 +7,28 @@
|
||||
report_config = {
|
||||
# Paginate HTML report. Maximum number of results to display on one page, before adding (paginating) an additional page.
|
||||
"htmlReportPaginate" : 100,
|
||||
# Name of the HTML file to create
|
||||
"htmlReportName" : "DuplicateTagScenes.html",
|
||||
# If enabled, report displays an image preview similar to sceneDuplicateChecker
|
||||
"htmlIncludeImagePreview" : False,
|
||||
"htmlImagePreviewSize" : 140,
|
||||
"htmlImagePreviewPopupSize" : 600,
|
||||
# If enabled, report displays a video preview
|
||||
"htmlIncludeVideoPreview" : True,
|
||||
"htmlVideoPreviewWidth" : 160,
|
||||
"htmlVideoPreviewHeight" : 120,
|
||||
# The number of seconds in time difference for supper highlight on htmlReport
|
||||
"htmlHighlightTimeDiff" : 3,
|
||||
# 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.
|
||||
# Supper highlight for details with higher resolution or duration
|
||||
"htmlSupperHighlight" : "yellow",
|
||||
# Text color for details with different resolution, duration, size, bitrate,codec, or framerate
|
||||
"htmlDetailDiffTextColor" : "violet", # Candid colors Magenta Tomato Violet
|
||||
# Lower highlight for details with slightly higher duration
|
||||
"htmlLowerHighlight" : "nyanza",
|
||||
# The report background color
|
||||
"htmlReportBackgroundColor" : "#f0f5f5",
|
||||
# The report text color
|
||||
"htmlReportTextColor" : "black",
|
||||
# HTML report prefix, before table listing
|
||||
"htmlReportPrefix" : """<!DOCTYPE html>
|
||||
<html>
|
||||
@@ -26,30 +43,12 @@ table, th, td {border:1px solid black;}
|
||||
.scene-details{text-align: center;font-size: small;}
|
||||
.reason-details{text-align: left;font-size: small;}
|
||||
.link-items{text-align: center;font-size: small;}
|
||||
.link-button {
|
||||
background: none;
|
||||
border: none;
|
||||
color: blue;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
font-size: 1em;
|
||||
font-family: serif;
|
||||
text-align: center;
|
||||
font-size: small;
|
||||
}
|
||||
.link-button:focus {
|
||||
outline: none;
|
||||
}
|
||||
.link-button:active {
|
||||
color:red;
|
||||
}
|
||||
ul {
|
||||
display: flex;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style-type: none;
|
||||
padding: 10px;
|
||||
padding: 1px;
|
||||
position: relative;
|
||||
}
|
||||
.large {
|
||||
@@ -64,127 +63,14 @@ li:hover .large {
|
||||
border-radius: 4px;
|
||||
box-shadow: 1px 1px 3px 3px rgba(127, 127, 127, 0.15);;
|
||||
}
|
||||
/******** Dropdown buttons *********/
|
||||
.dropdown {
|
||||
font-size: 14px;
|
||||
border: none;
|
||||
outline: none;
|
||||
color: white;
|
||||
padding: 6px 10px;
|
||||
background-color: transparent;
|
||||
font-family: inherit; /* Important for vertical align on mobile phones */
|
||||
margin: 0; /* Important for vertical align on mobile phones */
|
||||
}
|
||||
.dropdown-content{
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: inherit;
|
||||
min-width: 80px;
|
||||
box-shadow: 0px 4px 12px 0px rgba(0,0,0,0.2);
|
||||
z-index: 1;
|
||||
}
|
||||
.dropdown-content a {
|
||||
float: none;
|
||||
color: black;
|
||||
padding: 6px 10px;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
text-align: left;
|
||||
}
|
||||
.dropdown:hover .dropdown-content {
|
||||
display: block;
|
||||
}
|
||||
/*** Dropdown Buttons in Table ***/
|
||||
.dropbtn_table {
|
||||
font-size: 14px;
|
||||
border: none;
|
||||
outline: none;
|
||||
color: white;
|
||||
padding: 6px 10px;
|
||||
background-color: transparent;
|
||||
font-family: inherit; /* Important for vertical align on mobile phones */
|
||||
margin: 0; /* Important for vertical align on mobile phones */
|
||||
float:left;
|
||||
}
|
||||
.dropbtn_table-content{
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: inherit;
|
||||
min-width: 80px;
|
||||
box-shadow: 0px 4px 12px 0px rgba(0,0,0,0.2);
|
||||
z-index: 1;
|
||||
}
|
||||
.dropbtn_table:hover .dropbtn_table-content {
|
||||
display: block;
|
||||
}
|
||||
.links_table-content{
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: AntiqueWhite;
|
||||
min-width: 80px;
|
||||
box-shadow: 0px 4px 12px 0px rgba(0,0,0,0.2);
|
||||
z-index: 1;
|
||||
}
|
||||
.dropbtn_table:hover .links_table-content {
|
||||
display: block;
|
||||
}
|
||||
/*************-- Dropdown Icons --*************/
|
||||
.dropdown_icon {
|
||||
height:22px;
|
||||
width:30px;
|
||||
float:left;
|
||||
}
|
||||
/*** Dropdown Tag ***/
|
||||
.dropdown_tag-content{
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: LightCoral;
|
||||
min-width: 80px;
|
||||
box-shadow: 0px 4px 12px 0px rgba(0,0,0,0.2);
|
||||
z-index: 1;
|
||||
}
|
||||
.dropdown_icon:hover .dropdown_tag-content {
|
||||
display: block;
|
||||
}
|
||||
/*** Dropdown Performer ***/
|
||||
.dropdown_performer-content{
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: LightBlue;
|
||||
min-width: 80px;
|
||||
box-shadow: 0px 4px 12px 0px rgba(0,0,0,0.2);
|
||||
z-index: 1;
|
||||
}
|
||||
.dropdown_icon:hover .dropdown_performer-content {
|
||||
display: block;
|
||||
}
|
||||
/*** Dropdown Gallery ***/
|
||||
.dropdown_gallery-content{
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: AntiqueWhite;
|
||||
min-width: 80px;
|
||||
box-shadow: 0px 4px 12px 0px rgba(0,0,0,0.2);
|
||||
z-index: 1;
|
||||
}
|
||||
.dropdown_icon:hover .dropdown_gallery-content {
|
||||
display: block;
|
||||
}
|
||||
/*** Dropdown Group ***/
|
||||
.dropdown_group-content{
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: BurlyWood;
|
||||
min-width: 80px;
|
||||
box-shadow: 0px 4px 12px 0px rgba(0,0,0,0.2);
|
||||
z-index: 1;
|
||||
}
|
||||
.dropdown_icon:hover .dropdown_group-content {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<script src="https://www.axter.com/js/jquery-3.7.1.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://axter.com/js/easyui/themes/black/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://axter.com/js/easyui/themes/icon.css">
|
||||
<script type="text/javascript" src="https://axter.com/js/jquery-3.7.1.min.js"></script>
|
||||
<script type="text/javascript" src="https://axter.com/js/easyui/jquery.easyui.min.js"></script>
|
||||
|
||||
<script src="https://www.axter.com/js/jquery.prompt.js"></script>
|
||||
<link rel="stylesheet" href="https://www.axter.com/js/jquery.prompt.css"/>
|
||||
<script>
|
||||
@@ -215,7 +101,11 @@ function trim(str, ch) {
|
||||
while(end > start && str[end - 1] === ch) --end;
|
||||
return (start > 0 || end < str.length) ? str.substring(start, end) : str;
|
||||
}
|
||||
function RunPluginOperation(Mode, ActionID, button, asyncAjax){
|
||||
function RunPluginOperation(Mode, ActionID, button, asyncAjax){ // Mode=Value and ActionID=id
|
||||
if (Mode == null || Mode === ""){
|
||||
console.log("Error: Mode is empty or null; ActionID = " + ActionID);
|
||||
return;
|
||||
}
|
||||
if (asyncAjax){
|
||||
$('html').addClass('wait');
|
||||
$("body").css("cursor", "progress");
|
||||
@@ -233,8 +123,8 @@ function RunPluginOperation(Mode, ActionID, button, asyncAjax){
|
||||
$('html').removeClass('wait');
|
||||
$("body").css("cursor", "default");
|
||||
}
|
||||
if (Mode === "renameFile" || Mode === "clearAllSceneFlags" || Mode === "mergeTags" || (Mode !== "deleteScene" && Mode.startsWith("deleteScene")))
|
||||
location.href = location.href; // location.replace(location.href);
|
||||
if (Mode.startsWith("copyScene") || Mode.startsWith("renameFile") || Mode === "clearAllSceneFlags" || Mode.startsWith("clearFlag") || Mode.startsWith("mergeScene") || Mode.startsWith("mergeTags") || (Mode !== "deleteScene" && Mode.startsWith("deleteScene")))
|
||||
window.location.reload();
|
||||
if (!chkBxRemoveValid.checked && Mode !== "flagScene") alert("Action " + Mode + " for scene(s) ID# " + ActionID + " complete.\\n\\nResults=" + result);
|
||||
}, error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
console.log("Ajax failed with Status: " + textStatus + "; Error: " + errorThrown);
|
||||
@@ -245,6 +135,12 @@ function RunPluginOperation(Mode, ActionID, button, asyncAjax){
|
||||
}
|
||||
});
|
||||
}
|
||||
function GetStashTabUrl(Tab){
|
||||
var Url = GraphQl_URL;
|
||||
Url = Url.replace("graphql", "settings?tab=" + Tab);
|
||||
console.log("Url = " + Url);
|
||||
return Url;
|
||||
}
|
||||
function SetFlagOnScene(flagType, ActionID){
|
||||
if (flagType === "yellow highlight")
|
||||
$('.ID_' + ActionID).css('background','yellow');
|
||||
@@ -338,66 +234,103 @@ $(document).ready(function(){
|
||||
}
|
||||
}
|
||||
SetPaginateButtonChange();
|
||||
$("button").click(function(){
|
||||
var Mode = this.value;
|
||||
var ActionID = this.id;
|
||||
if (Mode === "DoNothing")
|
||||
return;
|
||||
if (ActionID === "AdvanceMenu" || ActionID === "AdvanceMenu_")
|
||||
{
|
||||
var newUrl = window.location.href;
|
||||
newUrl = newUrl.replace(/report\/DuplicateTagScenes[_0-9]*.html/g, "advance_options.html?GQL=" + GraphQl_URL + "&apiKey=" + apiKey);
|
||||
window.open(newUrl, "_blank");
|
||||
return;
|
||||
}
|
||||
if (Mode.startsWith("deleteScene") || Mode === "removeScene"){
|
||||
var chkBxDisableDeleteConfirm = document.getElementById("RemoveToKeepConfirm");
|
||||
question = "Are you sure you want to delete this file and remove scene from stash?";
|
||||
if (Mode !== "deleteScene" && Mode.startsWith("deleteScene")) question = "Are you sure you want to delete all the flagged files and remove them from stash?";
|
||||
if (Mode === "removeScene") question = "Are you sure you want to remove scene from stash?";
|
||||
if (!chkBxDisableDeleteConfirm.checked && !confirm(question))
|
||||
function ProcessClick(This_){
|
||||
if (This_ == null)
|
||||
return;
|
||||
if (Mode === "deleteScene" || Mode === "removeScene"){
|
||||
$('.ID_' + ActionID).css('background-color','gray');
|
||||
$('.ID_' + ActionID).css('pointer-events','none');
|
||||
const ID = This_.id;
|
||||
var Value = This_.getAttribute("value");
|
||||
if ((ID == null || ID === "") && (Value == null || Value === ""))
|
||||
return;
|
||||
if (Value == null) Value = "";
|
||||
var Mode = Value;
|
||||
var ActionID = ID;
|
||||
console.log("Mode = " + Mode + "; ActionID =" + ActionID);
|
||||
if (Mode === "DoNothing")
|
||||
return;
|
||||
if (ActionID === "AdvanceMenu" || ActionID === "AdvanceMenu_")
|
||||
{
|
||||
var newUrl = window.location.href;
|
||||
newUrl = newUrl.replace(/report\/DuplicateTagScenes[_0-9]*.html/g, "advance_options.html?GQL=" + GraphQl_URL + "&apiKey=" + apiKey);
|
||||
window.open(newUrl, "_blank");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (Mode === "newName" || Mode === "renameFile"){
|
||||
var myArray = ActionID.split(":");
|
||||
var promptStr = "Enter new name for scene ID " + myArray[0] + ", or press escape to cancel.";
|
||||
if (Mode === "renameFile")
|
||||
promptStr = "Press enter to rename scene ID " + myArray[0] + ", or press escape to cancel.";
|
||||
var newName=prompt(promptStr,trim(myArray[1], "'"));
|
||||
if (newName === null)
|
||||
return;
|
||||
ActionID = myArray[0] + ":" + newName;
|
||||
Mode = "renameFile";
|
||||
if (Mode.startsWith("deleteScene") || Mode === "removeScene"){
|
||||
var chkBxDisableDeleteConfirm = document.getElementById("RemoveToKeepConfirm");
|
||||
question = "Are you sure you want to delete this file and remove scene from stash?";
|
||||
if (Mode !== "deleteScene" && Mode.startsWith("deleteScene")) question = "Are you sure you want to delete all the flagged files and remove them from stash?";
|
||||
if (Mode === "removeScene") question = "Are you sure you want to remove scene from stash?";
|
||||
if (!chkBxDisableDeleteConfirm.checked && !confirm(question))
|
||||
return;
|
||||
if (Mode === "deleteScene" || Mode === "removeScene"){
|
||||
$('.ID_' + ActionID).css('background-color','gray');
|
||||
$('.ID_' + ActionID).css('pointer-events','none');
|
||||
}
|
||||
}
|
||||
else if (ID === "viewStashPlugin")
|
||||
window.open(GetStashTabUrl("plugins"), "_blank");
|
||||
else if (ID === "viewStashTools")
|
||||
window.open(GetStashTabUrl("tools"), "_blank");
|
||||
else if (Mode === "newName" || Mode === "renameFile"){
|
||||
var myArray = ActionID.split(":");
|
||||
var promptStr = "Enter new name for scene ID " + myArray[0] + ", or press escape to cancel.";
|
||||
if (Mode === "renameFile")
|
||||
promptStr = "Press enter to rename scene ID " + myArray[0] + ", or press escape to cancel.";
|
||||
var newName=prompt(promptStr,trim(myArray[1], "'"));
|
||||
if (newName === null)
|
||||
return;
|
||||
ActionID = myArray[0] + ":" + newName;
|
||||
Mode = "renameFile";
|
||||
}
|
||||
else if (Mode === "flagScene"){
|
||||
selectMarker(Mode, ActionID, This_);
|
||||
return;
|
||||
}
|
||||
else if (Mode.startsWith("flagScene")){
|
||||
var flagType = Mode.substring(9);
|
||||
Mode = "flagScene";
|
||||
if (!SetFlagOnScene(flagType, ActionID))
|
||||
return;
|
||||
ActionID = ActionID + ":" + flagType;
|
||||
console.log("ActionID = " + ActionID);
|
||||
}
|
||||
RunPluginOperation(Mode, ActionID, This_, true);
|
||||
}
|
||||
else if (Mode === "flagScene"){
|
||||
selectMarker(Mode, ActionID, this);
|
||||
return;
|
||||
}
|
||||
else if (Mode.startsWith("flagScene")){
|
||||
var flagType = Mode.substring(9);
|
||||
Mode = "flagScene";
|
||||
if (!SetFlagOnScene(flagType, ActionID))
|
||||
return;
|
||||
ActionID = ActionID + ":" + flagType;
|
||||
console.log("ActionID = " + ActionID);
|
||||
}
|
||||
RunPluginOperation(Mode, ActionID, this, true);
|
||||
});
|
||||
$("#RemoveValidatePrompt").change(function() {
|
||||
console.log("checkbox clicked");
|
||||
SetPaginateButtonChange();
|
||||
});
|
||||
$("#RemoveToKeepConfirm").change(function() {
|
||||
SetPaginateButtonChange();
|
||||
});
|
||||
$("button").click(function(){
|
||||
ProcessClick(this);
|
||||
});
|
||||
$("a").click(function(){
|
||||
if (this.id.startsWith("btn_mnu"))
|
||||
return;
|
||||
if (this.id === "reload"){
|
||||
window.location.reload();
|
||||
return;
|
||||
}
|
||||
if (this.id === "PrevPage" || this.id === "NextPage" || this.id === "HomePage" || this.id === "PrevPage_Top" || this.id === "NextPage_Top" || this.id === "HomePage_Top"){
|
||||
return;
|
||||
}
|
||||
ProcessClick(this);
|
||||
});
|
||||
$("div").click(function(){
|
||||
if (this.id.startsWith("btn_mnu"))
|
||||
return;
|
||||
if (this.id === "reload"){
|
||||
window.location.reload();
|
||||
return;
|
||||
}
|
||||
ProcessClick(this);
|
||||
});
|
||||
$("#RemoveValidatePrompt").change(function() {
|
||||
console.log("checkbox clicked");
|
||||
SetPaginateButtonChange();
|
||||
});
|
||||
$("#RemoveToKeepConfirm").change(function() {
|
||||
SetPaginateButtonChange();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div style="background-color:BackgroundColorPlaceHolder;color:TextColorPlaceHolder;">
|
||||
<center><table style="color:darkgreen;background-color:powderblue;">
|
||||
<tr><th>Report Info</th><th>Report Options</th></tr>
|
||||
<tr>
|
||||
@@ -407,26 +340,90 @@ $(document).ready(function(){
|
||||
</tr></table></td>
|
||||
<td><table><tr>
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<button id="AdvanceMenu" name="AdvanceMenu">Menu <i class="fa fa-caret-down"></i></button>
|
||||
<div class="dropdown-content">
|
||||
<div><button id="AdvanceMenu" title="Open [Advance Duplicate File Deletion Menu] on a new tab in the browser." name="AdvanceMenu">Advance Duplicate File Deletion Menu</i></button></div>
|
||||
<div style="height:2px;width:220px;border-width:0;color:gray;background-color:gray;">_</div>
|
||||
<div><button type="button" id="mergeMetadataForAll" value="mergeTags" title="Merge scene metadata from [Duplicate to Delete] to [Duplicate to Keep]. This action make take a few minutes to complete.">Merge Tags, Performers, and Galleries</button></div>
|
||||
<div><button type="button" id="clear_duplicate_tags_task" value="clear_duplicate_tags_task" title="Remove duplicate (_DuplicateMarkForDeletion_?) tag from all scenes. This action make take a few minutes to complete.">Remove Scenes Dup Tags</button></div>
|
||||
<div style="height:2px;width:220px;border-width:0;color:gray;background-color:gray;">_</div>
|
||||
<div><button type="button" id="fileNotExistToDelete" value="Tagged" title="Delete tagged duplicates for which file does NOT exist.">Delete Tagged Files That do Not Exist</button></div>
|
||||
<div><button type="button" id="fileNotExistToDelete" value="Report" title="Delete duplicate candidate files in report for which file does NOT exist.">Delete Files That do Not Exist in Report</button></div>
|
||||
<div style="height:2px;width:220px;border-width:0;color:gray;background-color:gray;">_</div>
|
||||
<div><button type="button" id="clearAllSceneFlags" value="clearAllSceneFlags" title="Remove flags from report for all scenes, except for deletion flag.">Clear All Scene Flags</button></div>
|
||||
<div><button title="Delete all yellow flagged scenes in report." value="deleteSceneYellowFlag" id="yellow" style="background-color:yellow" >Delete All Yellow Flagged Scenes</button></div>
|
||||
<div><button title="Delete all green flagged scenes in report." value="deleteSceneGreenFlag" id="green" style="background-color:#00FF00" >Delete All Green Flagged Scenes</button></div>
|
||||
<div><button title="Delete all orange flagged scenes in report." value="deleteSceneOrangeFlag" id="orange" style="background-color:orange" >Delete All Orange Flagged Scenes</button></div>
|
||||
<div><button title="Delete all cyan flagged scenes in report." value="deleteSceneCyanFlag" id="cyan" style="background-color:cyan" >Delete All Cyan Flagged Scenes</button></div>
|
||||
<div><button title="Delete all pink flagged scenes in report." value="deleteScenePinkFlag" id="pink" style="background-color:pink" >Delete All Pink Flagged Scenes</button></div>
|
||||
<div><button title="Delete all red flagged scenes in report." value="deleteSceneRedFlag" id="red" style="background-color:red" >Delete All Red Flagged Scenes</button></div>
|
||||
<div><button title="Delete all strike-through scenes in report." value="StrikeThrough" id="line-through" >Delete All Strike-through Scenes</button></div>
|
||||
</div>
|
||||
<div class="easyui-panel">
|
||||
<a id="btn_mnu" class="easyui-menubutton" menu="#btn_mnu1">Menu</a>
|
||||
</div>
|
||||
<div id="btn_mnu1">
|
||||
<div iconCls="icon-add" id="AdvanceMenu" title="Open [Advance Duplicate File Deletion Menu] on a new tab in the browser." name="AdvanceMenu">Advance Duplicate File Deletion Menu</div>
|
||||
<div iconCls="icon-reload" id="reload" title="Reload (refresh) this page." name="reload">Reload Page</div>
|
||||
<div iconCls="icon-menu1" id="viewStashPlugin" title="View Stash plugins menu.">Stash Plugins</div>
|
||||
<div iconCls="icon-menu-blue" id="viewStashTools" title="View Stash tools menu.">Stash Tools</div>
|
||||
<div iconCls="icon-more"><a href="https://github.com/David-Maisonave/Axter-Stash/tree/main/plugins" target="_blank" rel="noopener noreferrer">Axter-Stash Plugins</a></div>
|
||||
<div class="menu-sep"></div>
|
||||
<div iconCls="icon-merge" id="mergeMetadataForAll" value="mergeTags" title="Merge scene metadata from [Duplicate to Delete] to [Duplicate to Keep] for any [Duplicate to Keep] scene missing metadata that is in associated [Duplicate to Delete] scene. This action make take a few minutes to complete.">Merge Tags, Performers, and Galleries</button></div>
|
||||
<div iconCls="icon-no" id="clear_duplicate_tags_task" value="clear_duplicate_tags_task" title="Remove duplicate (_DuplicateMarkForDeletion_?) tag from all scenes. This action make take a few minutes to complete.">Clear Dup (_DuplicateMarkForDeletion_) Tags</button></div>
|
||||
<div class="menu-sep"></div>
|
||||
<div iconCls="icon-pink-x" id="fileNotExistToDelete" value="Tagged" title="Delete tagged duplicates for which file does NOT exist.">Delete Dup Tagged Files That do Not Exist</button></div>
|
||||
<div iconCls="icon-cancel" id="fileNotExistToDelete" value="Report" title="Delete duplicate candidate files in report for which file does NOT exist.">Delete Files That do Not Exist in Report</button></div>
|
||||
<div class="menu-sep"></div>
|
||||
<div iconCls="icon-cancel" title="Delete all [Duplicate to Delete] scenes flagged with selected flag.">
|
||||
<span>Delete Flagged Scenes</span>
|
||||
<div>
|
||||
<div iconCls="icon-cancel" title="Delete all [Duplicate to Delete] cyan flagged scenes in report." value="deleteSceneCyanFlag" id="cyan" style="background-color:cyan;color:black;" >Delete All Cyan Flagged Scenes</button></div>
|
||||
<div iconCls="icon-cancel" title="Delete all [Duplicate to Delete] green flagged scenes in report." value="deleteSceneGreenFlag" id="green" style="background-color:#00FF00;color:black;" >Delete All Green Flagged Scenes</button></div>
|
||||
<div iconCls="icon-cancel" title="Delete all [Duplicate to Delete] orange flagged scenes in report." value="deleteSceneOrangeFlag" id="orange" style="background-color:orange;color:black;" >Delete All Orange Flagged Scenes</button></div>
|
||||
<div iconCls="icon-cancel" title="Delete all [Duplicate to Delete] yellow flagged scenes in report." value="deleteSceneYellowFlag" id="yellow" style="background-color:yellow;color:black;" >Delete All Yellow Flagged Scenes</button></div>
|
||||
<div iconCls="icon-cancel" title="Delete all [Duplicate to Delete] pink flagged scenes in report." value="deleteScenePinkFlag" id="pink" style="background-color:pink;color:black;" >Delete All Pink Flagged Scenes</button></div>
|
||||
<div iconCls="icon-cancel" title="Delete all [Duplicate to Delete] red flagged scenes in report." value="deleteSceneRedFlag" id="red" style="background-color:red;color:white;" >Delete All Red Flagged Scenes</button></div>
|
||||
</div>
|
||||
</div>
|
||||
<div iconCls="icon-copy" title="Copy the file from [Duplicate to Delete] to [Duplicate to Keep] for all [Duplicate to Delete] flagged scenes.">
|
||||
<span>Copy Flagged Scenes</span>
|
||||
<div>
|
||||
<div iconCls="icon-copy-clear" title="Copy all cyan flagged scenes in report." value="copySceneCyanFlag" id="cyan" style="background-color:cyan;color:black;" >Copy All Cyan Flagged Scenes</button></div>
|
||||
<div iconCls="icon-copy-clear" title="Copy all green flagged scenes in report." value="copySceneGreenFlag" id="green" style="background-color:#00FF00;color:black;" >Copy All Green Flagged Scenes</button></div>
|
||||
<div iconCls="icon-copy-clear" title="Copy all orange flagged scenes in report." value="copySceneOrangeFlag" id="orange" style="background-color:orange;color:black;" >Copy All Orange Flagged Scenes</button></div>
|
||||
<div iconCls="icon-copy-clear" title="Copy all yellow flagged scenes in report." value="copySceneYellowFlag" id="yellow" style="background-color:yellow;color:black;" >Copy All Yellow Flagged Scenes</button></div>
|
||||
<div iconCls="icon-copy-clear" title="Copy all pink flagged scenes in report." value="copyScenePinkFlag" id="pink" style="background-color:pink;color:black;" >Copy All Pink Flagged Scenes</button></div>
|
||||
<div iconCls="icon-copy-clear" title="Copy all red flagged scenes in report." value="copySceneRedFlag" id="red" style="background-color:red;color:white;" >Copy All Red Flagged Scenes</button></div>
|
||||
</div>
|
||||
</div>
|
||||
<div iconCls="icon-documents" title="Copy the file and metadata (Tags, Performers, & Galleries) from [Duplicate to Delete] to [Duplicate to Keep] for all [Duplicate to Delete] flagged scenes.">
|
||||
<span>Move Flagged Scenes</span>
|
||||
<div>
|
||||
<div iconCls="icon-documents" title="Move all cyan flagged scenes in report." value="moveSceneCyanFlag" id="cyan" style="background-color:cyan;color:black;" >Move All Cyan Flagged Scenes</button></div>
|
||||
<div iconCls="icon-documents" title="Move all green flagged scenes in report." value="moveSceneGreenFlag" id="green" style="background-color:#00FF00;color:black;" >Move All Green Flagged Scenes</button></div>
|
||||
<div iconCls="icon-documents" title="Move all orange flagged scenes in report." value="moveSceneOrangeFlag" id="orange" style="background-color:orange;color:black;" >Move All Orange Flagged Scenes</button></div>
|
||||
<div iconCls="icon-documents" title="Move all yellow flagged scenes in report." value="moveSceneYellowFlag" id="yellow" style="background-color:yellow;color:black;" >Move All Yellow Flagged Scenes</button></div>
|
||||
<div iconCls="icon-documents" title="Move all pink flagged scenes in report." value="moveScenePinkFlag" id="pink" style="background-color:pink;color:black;" >Move All Pink Flagged Scenes</button></div>
|
||||
<div iconCls="icon-documents" title="Move all red flagged scenes in report." value="moveSceneRedFlag" id="red" style="background-color:red;color:white;" >Move All Red Flagged Scenes</button></div>
|
||||
</div>
|
||||
</div>
|
||||
<div iconCls="icon-merge" title="Merge scene metadata from [Duplicate to Delete] to [Duplicate to Keep] for all [Duplicate to Delete] flagged scenes. This action make take a few minutes to complete.">
|
||||
<span>Merge (Tags, Performers, & Galleries) Flagged Scenes</span>
|
||||
<div>
|
||||
<div iconCls="icon-merge" title="Merge all cyan flagged scenes in report." value="mergeSceneCyanFlag" id="cyan" style="background-color:cyan;color:black;" >Merge All Cyan Flagged Scenes</button></div>
|
||||
<div iconCls="icon-merge" title="Merge all green flagged scenes in report." value="mergeSceneGreenFlag" id="green" style="background-color:#00FF00;color:black;" >Merge All Green Flagged Scenes</button></div>
|
||||
<div iconCls="icon-merge" title="Merge all orange flagged scenes in report." value="mergeSceneOrangeFlag" id="orange" style="background-color:orange;color:black;" >Merge All Orange Flagged Scenes</button></div>
|
||||
<div iconCls="icon-merge" title="Merge all yellow flagged scenes in report." value="mergeSceneYellowFlag" id="yellow" style="background-color:yellow;color:black;" >Merge All Yellow Flagged Scenes</button></div>
|
||||
<div iconCls="icon-merge" title="Merge all pink flagged scenes in report." value="mergeScenePinkFlag" id="pink" style="background-color:pink;color:black;" >Merge All Pink Flagged Scenes</button></div>
|
||||
<div iconCls="icon-merge" title="Merge all red flagged scenes in report." value="mergeSceneRedFlag" id="red" style="background-color:red;color:white;" >Merge All Red Flagged Scenes</button></div>
|
||||
</div>
|
||||
</div>
|
||||
<div iconCls="icon-lock" title="Add special tag [_ExcludeDuplicateMarkForDeletion] for [Duplicate to Delete] scenes flagged with selected flag.">
|
||||
<span>Add Exclude TAG to Flagged Scenes</span>
|
||||
<div>
|
||||
<div iconCls="icon-lock" title="Add Exclude TAG to all [Duplicate to Delete] cyan flagged scenes in report." value="addExcludeTagCyanFlag" id="cyan" style="background-color:cyan;color:black;" >Add Exclude TAG to Cyan Flagged Scenes</button></div>
|
||||
<div iconCls="icon-lock" title="Add Exclude TAG to all [Duplicate to Delete] green flagged scenes in report." value="addExcludeTagGreenFlag" id="green" style="background-color:#00FF00;color:black;" >Add Exclude TAG to Green Flagged Scenes</button></div>
|
||||
<div iconCls="icon-lock" title="Add Exclude TAG to all [Duplicate to Delete] orange flagged scenes in report." value="addExcludeTagOrangeFlag" id="orange" style="background-color:orange;color:black;" >Add Exclude TAG to Orange Flagged Scenes</button></div>
|
||||
<div iconCls="icon-lock" title="Add Exclude TAG to all [Duplicate to Delete] yellow flagged scenes in report." value="addExcludeTagYellowFlag" id="yellow" style="background-color:yellow;color:black;" >Add Exclude TAG to Yellow Flagged Scenes</button></div>
|
||||
<div iconCls="icon-lock" title="Add Exclude TAG to all [Duplicate to Delete] pink flagged scenes in report." value="addExcludeTagPinkFlag" id="pink" style="background-color:pink;color:black;" >Add Exclude TAG to Pink Flagged Scenes</button></div>
|
||||
<div iconCls="icon-lock" title="Add Exclude TAG to all [Duplicate to Delete] red flagged scenes in report." value="addExcludeTagRedFlag" id="red" style="background-color:red;color:white;" >Add Exclude TAG to Red Flagged Scenes</button></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="menu-sep"></div>
|
||||
<div iconCls="icon-eraser-minus" id="clearAllSceneFlags" value="clearAllSceneFlags" title="Remove all flags from report for all scenes, except for deletion flag.">Clear All Flags from All Scenes</button></div>
|
||||
<div iconCls="icon-eraser-minus" class="easyui-tooltip" title="Clear specific flag from all scenes.">
|
||||
<span>Clear Flag from All Scenes</span>
|
||||
<div>
|
||||
<div iconCls="icon-eraser-minus" title="Clear flag cyan from all scenes." value="clearFlagCyanFlag" id="cyan" style="background-color:cyan;color:black;" >Clear Cyan</button></div>
|
||||
<div iconCls="icon-eraser-minus" title="Clear flag green from all scenes." value="clearFlagGreenFlag" id="green" style="background-color:#00FF00;color:black;" >Clear Green</button></div>
|
||||
<div iconCls="icon-eraser-minus" title="Clear flag orange from all scenes." value="clearFlagOrangeFlag" id="orange" style="background-color:orange;color:black;" >Clear Orange</button></div>
|
||||
<div iconCls="icon-eraser-minus" title="Clear flag yellow from all scenes." value="clearFlagYellowFlag" id="yellow" style="background-color:yellow;color:black;" >Clear Yellow</button></div>
|
||||
<div iconCls="icon-eraser-minus" title="Clear flag pink from all scenes." value="clearFlagPinkFlag" id="pink" style="background-color:pink;color:black;" >Clear Pink</button></div>
|
||||
<div iconCls="icon-eraser-minus" title="Clear flag red from all scenes." value="clearFlagRedFlag" id="red" style="background-color:red;color:white;" >Clear Red</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td><input type="checkbox" id="RemoveValidatePrompt" name="RemoveValidatePrompt"><label for="RemoveValidatePrompt" title="Disable notice for task completion (Popup).">Disable Complete Confirmation</label><br></td>
|
||||
@@ -436,7 +433,7 @@ $(document).ready(function(){
|
||||
</tr></table></center>
|
||||
<h2>Stash Duplicate Scenes Report (MatchTypePlaceHolder)</h2>\n""",
|
||||
# HTML report postfiox, after table listing
|
||||
"htmlReportPostfix" : "\n</body></html>",
|
||||
"htmlReportPostfix" : "\n</div></body></html>",
|
||||
# HTML report table
|
||||
"htmlReportTable" : "<table style=\"width:100%\">",
|
||||
# HTML report table row
|
||||
@@ -446,17 +443,9 @@ $(document).ready(function(){
|
||||
# HTML report table data
|
||||
"htmlReportTableData" : "<td>",
|
||||
# HTML report video preview
|
||||
"htmlReportVideoPreview" : "width='160' height='120' controls", # Alternative option "autoplay loop controls" or "autoplay controls"
|
||||
# The number off seconds in time difference for supper highlight on htmlReport
|
||||
"htmlHighlightTimeDiff" : 3,
|
||||
# Supper highlight for details with higher resolution or duration
|
||||
"htmlSupperHighlight" : "yellow",
|
||||
# Lower highlight for details with slightly higher duration
|
||||
"htmlLowerHighlight" : "nyanza",
|
||||
# Text color for details with different resolution, duration, size, bitrate,codec, or framerate
|
||||
"htmlDetailDiffTextColor" : "red",
|
||||
"htmlReportVideoPreview" : "controls", # Alternative option "autoplay loop controls" or "autoplay controls"
|
||||
# Name of the HTML file to create
|
||||
"htmlReportName" : "DuplicateTagScenes.html",
|
||||
# If enabled, create an HTML report when tagging duplicate files
|
||||
"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.
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# DupFileManager: Ver 1.0.1 (By David Maisonave)
|
||||
# DupFileManager: Ver 1.1.0 (By David Maisonave)
|
||||
|
||||
DupFileManager is a [Stash](https://github.com/stashapp/stash) plugin which manages duplicate files in the Stash system.
|
||||
It has both **task** and **tools-UI** components.
|
||||
@@ -101,11 +101,31 @@ That's it!!!
|
||||
- Full bottom extended portion of the Advanced Menu screen.
|
||||
- 
|
||||
|
||||
### Future Planned Features or Fixes
|
||||
- Add logic to merge performers and galaries seperatly from tag merging on report. Planned for 1.5.0 Version.
|
||||
- Add code to report to make it when the report updates the screen (due to tag merging), it stays in the same row position. Planned for 1.5.0 Version.
|
||||
- Fix errors on HTML page listed in https://validator.w3.org. Planned for 1.9.0 Version.
|
||||
- Add logic to merge group metadata when selecting merge option on report. Planned for 2.0.0 Version.
|
||||
- Add advanced menu directly to the Settings->Tools menu. Planned for 2.0.0 Version.
|
||||
- Add report directly to the Settings->Tools menu. Planned for 2.0.0 Version.
|
||||
|
||||
### Future Planned Features, Changes, or Fixes
|
||||
- Scheduled Changes
|
||||
- Add chat icon to report which on hover, displays a popup window showing scene details content. Planned for 1.2.0 Version.
|
||||
- Add image icon to report; on hover show scene cover image. Planned for 1.2.0 Version.
|
||||
- Add studio icon to report; on hover show studio name. Planned for 1.2.0 Version.
|
||||
- Add option on report to view rating and change it. Use an icon with a number on it to show rating. Planned for 1.2.0 Version.
|
||||
- On report make flag toggle logic. In other words, when flag button is selected, and scene is already that color, remove the colored flag. Planned for 1.2.0 Version.
|
||||
- Add report option to set flag to all scenes missing metadata on Scene-ToKeep or having higher resolution or longer duration on **Duplicate-to-Delete** scene. Planned for 1.2.0 Version.
|
||||
- Add option to [**Advance Duplicate File Menu**] to display cover image for preview image. Planned for 1.2.0 Version.
|
||||
- On report, when move operation is performed, have it automatically delete the **Duplicate-to-Delete** scene. Planned for 1.2.0 Version.
|
||||
- On [**Advance Duplicate File Menu**], add a flag option to the menu on the left side, and shrink the tag option. Planned for 1.2.0 Version.
|
||||
- Change the TagOrFlag option on the right side to a check mark.
|
||||
- Add option to delete by file type. Planned for 1.2.0 Version.
|
||||
- On report, have [Flag or Tag] option still enabled after manually disabling scene. Planned for 1.2.0 Version.
|
||||
- On [**Advance Duplicate File Menu**], have the details section hide fully, or partially when the page is first displayed. Planned for 1.4.0 Version.
|
||||
- Unscheduled Changes
|
||||
- Change splitbutton so it hides tooltip when hovering over dropdown side of the button.
|
||||
- Fix errors on HTML page listed in https://validator.w3.org.
|
||||
- Add logic to merge performers and galaries seperatly from tag merging on report.
|
||||
- Add logic to merge group metadata when selecting merge option on report.
|
||||
- Add advanced menu directly to the Settings->Tools menu.
|
||||
- Add report directly to the Settings->Tools menu.
|
||||
- Create cookies for the options in the [**Advance Duplicate File Menu**].
|
||||
- Add doulbe strike-through option to flagging.
|
||||
- Add option to report to avoid reloading page after updating report.
|
||||
- Add option to report to automatically strip width & height from name on rename.
|
||||
|
||||
|
||||
@@ -830,11 +830,13 @@ class StashPluginHelper(StashInterface):
|
||||
data = data.replace("\\\\\\\\", "\\\\")
|
||||
return json.loads(data)
|
||||
|
||||
def isCorrectDbVersion(self, verNumber = 68):
|
||||
def isCorrectDbVersion(self, verNumber = 68, isEqualOrGreater = True):
|
||||
results = self.sql_query("select version from schema_migrations")
|
||||
# self.Log(results)
|
||||
if len(results['rows']) == 0 or len(results['rows'][0]) == 0:
|
||||
return False
|
||||
if isEqualOrGreater:
|
||||
return int(results['rows'][0][0]) >= verNumber
|
||||
return int(results['rows'][0][0]) == verNumber
|
||||
|
||||
def renameFileNameInDB(self, fileId, oldName, newName, UpdateUsingIdOnly = False):
|
||||
@@ -848,6 +850,11 @@ class StashPluginHelper(StashInterface):
|
||||
return True
|
||||
return False
|
||||
|
||||
# This only works if filename has not changed. If file name has changed, call renameFileNameInDB first.
|
||||
def updateFileScene(self, fullFilePath):
|
||||
mylist = [fullFilePath]
|
||||
return self.metadata_scan(mylist)
|
||||
|
||||
def getFileNameFromDB(self, id):
|
||||
results = self.sql_query(f'select basename from files where id = {id};')
|
||||
self.Trace(f"results = ({results})")
|
||||
@@ -870,6 +877,10 @@ class StashPluginHelper(StashInterface):
|
||||
self.Debug(f"Called sql_commit and received results {results}.")
|
||||
return True
|
||||
|
||||
def isEmpty(self, data):
|
||||
if data == None or len(data) == 0:
|
||||
return True
|
||||
return False
|
||||
|
||||
# ############################################################################################################
|
||||
# Functions which are candidates to be added to parent class use snake_case naming convention.
|
||||
|
||||
@@ -8,68 +8,13 @@ table, th, td {border:1px solid black;}
|
||||
.inline {
|
||||
display: inline;
|
||||
}
|
||||
.scene-details{text-align: center;font-size: small;}
|
||||
.reason-details{text-align: left;font-size: small;}
|
||||
.link-items{text-align: center;font-size: small;}
|
||||
.link-button {
|
||||
background: none;
|
||||
border: none;
|
||||
color: blue;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
font-size: 1em;
|
||||
font-family: serif;
|
||||
text-align: center;
|
||||
font-size: small;
|
||||
}
|
||||
.link-button:focus {
|
||||
outline: none;
|
||||
}
|
||||
.link-button:active {
|
||||
color:red;
|
||||
}
|
||||
html.wait, html.wait * { cursor: wait !important; }
|
||||
/* The dropdown container */
|
||||
.dropdown {
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
}
|
||||
/******** Dropdown button *********/
|
||||
.dropdown .dropbtn {
|
||||
font-size: 14px;
|
||||
border: none;
|
||||
outline: none;
|
||||
color: white;
|
||||
padding: 6px 10px;
|
||||
background-color: transparent;
|
||||
font-family: inherit; /* Important for vertical align on mobile phones */
|
||||
margin: 0; /* Important for vertical align on mobile phones */
|
||||
}
|
||||
/* Dropdown content (hidden by default) */
|
||||
.dropdown-content {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: inherit;
|
||||
min-width: 80px;
|
||||
box-shadow: 0px 4px 12px 0px rgba(0,0,0,0.2);
|
||||
z-index: 1;
|
||||
}
|
||||
/* Links inside the dropdown */
|
||||
.dropdown-content a {
|
||||
float: none;
|
||||
color: black;
|
||||
padding: 6px 10px;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
text-align: left;
|
||||
}
|
||||
/* Show the dropdown menu on hover */
|
||||
.dropdown:hover .dropdown-content {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<script src="https://www.axter.com/js/jquery-3.7.1.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="https://axter.com/js/easyui/themes/black/easyui.css"> <!-- black || material-blue-->
|
||||
<link rel="stylesheet" type="text/css" href="https://axter.com/js/easyui/themes/icon.css">
|
||||
<!-- <script type="text/javascript" src="https://axter.com/js/easyui/jquery.min.js"></script> -->
|
||||
<script type="text/javascript" src="https://axter.com/js/jquery-3.7.1.min.js"></script>
|
||||
<script type="text/javascript" src="https://axter.com/js/easyui/jquery.easyui.min.js"></script>
|
||||
<script src="https://www.axter.com/js/jquery.prompt.js"></script>
|
||||
<link rel="stylesheet" href="https://www.axter.com/js/jquery.prompt.css"/>
|
||||
<script>
|
||||
@@ -85,6 +30,7 @@ console.log("GQL = " + GraphQl_URL);
|
||||
console.log("Key = " + apiKey);
|
||||
|
||||
function RunPluginDupFileManager(Mode, Param = 0, Async = false, TagOnlyScenes = false) {
|
||||
// alert("Mode = " + Mode + ";Param = " + Param);
|
||||
$('html').addClass('wait');
|
||||
$("body").css("cursor", "progress");
|
||||
if (TagOnlyScenes)
|
||||
@@ -114,8 +60,8 @@ function RunPluginDupFileManager(Mode, Param = 0, Async = false, TagOnlyScenes =
|
||||
if (result.indexOf("\"Report complete\"") == -1)
|
||||
alert("Stash RunPluginOperation returned unexpected results.\nNot sure if report completed successfully.\n\nResults = " + result);
|
||||
else
|
||||
$('<p>Report complete. Click on OK to open report in browser.</p>').confirm(function(e){
|
||||
if(e.response){
|
||||
$('<p>Report complete. Click on OK to open report in browser.</p>').confirm(function(retrn){
|
||||
if(retrn.response){
|
||||
var reportUrl = window.location.href;
|
||||
reportUrl = reportUrl.replace("advance_options.html", "report/DuplicateTagScenes.html");
|
||||
console.log("reportUrl = " + reportUrl);
|
||||
@@ -130,64 +76,87 @@ function RunPluginDupFileManager(Mode, Param = 0, Async = false, TagOnlyScenes =
|
||||
}
|
||||
});
|
||||
console.log("Setting default cursor");
|
||||
}
|
||||
$(document).ready(function(){
|
||||
$("button").click(function(){
|
||||
}
|
||||
function GetStashTabUrl(Tab){
|
||||
var Url = GraphQl_URL;
|
||||
Url = Url.replace("graphql", "settings?tab=" + Tab);
|
||||
console.log("Url = " + Url);
|
||||
return Url;
|
||||
}
|
||||
function GetReportCreateOptions(Value){
|
||||
if (Value === "-1")
|
||||
return "";
|
||||
const param = Value + ":" + $("#significantTimeDiff").val() + ":" + $("#IncludePreviewImage").prop('checked') + ":" + $("#scenesPerPage").val() + ":" + $("#ImagePreviewSize").val() + ":" + $("#ImagePreviewPopupSize").val() + ":" + $("#TimeDiffHighlight").val() + ":" + $("#maxDupToProcess").val() + ":" + $("#streamOverPreview").prop('checked') + ":" + $("#SupperHighlight").val() + ":" + $("#DetailDiffTextColor").val() + ":" + $("#LowerHighlight").val() + ":" + $("#ReportBackgroundColor").val() + ":" + $("#ReportTextColor").val() + ":" + $("#VideoPreviewWidth").val() + ":" + $("#VideoPreviewHeight").val() + ":" + $("#IncludePreviewVideo").prop('checked');
|
||||
console.log("param = " + param);
|
||||
return param;
|
||||
}
|
||||
function ProcessClick(This_){
|
||||
if (This_ == null)
|
||||
return;
|
||||
const ID = This_.id;
|
||||
var Value = This_.getAttribute("value");
|
||||
if ((ID == null || ID === "") && (Value == null || Value === ""))
|
||||
return;
|
||||
if (Value == null) Value = "";
|
||||
console.log("ID = " + ID + "; Value = " + Value);// alert("ID = " + ID + "; Value = " + Value);
|
||||
const AddedWarn = "? This will delete the files, and remove them from stash.";
|
||||
console.log(this.id);
|
||||
var blackliststr = "";
|
||||
var comparestr = "less than ";
|
||||
if (this.id.includes("Blacklist")) blackliststr = "in blacklist ";
|
||||
if (this.id.includes("Graylist")) blackliststr = "in graylist ";
|
||||
if (this.id.includes("Pinklist")) blackliststr = "in pinklist ";
|
||||
if (this.id.includes("Greater")) comparestr = "greater than ";
|
||||
else if (this.id.includes("Eq")) comparestr = "equal to ";
|
||||
|
||||
if (this.id === "tag_duplicates_task")
|
||||
if (ID.includes("Blacklist")) blackliststr = "in blacklist ";
|
||||
if (ID.includes("Graylist")) blackliststr = "in graylist ";
|
||||
if (ID.includes("Pinklist")) blackliststr = "in pinklist ";
|
||||
if (ID.includes("Greater")) comparestr = "greater than ";
|
||||
else if (ID.includes("Eq")) comparestr = "equal to ";
|
||||
|
||||
if (ID === "tag_duplicates_task")
|
||||
{
|
||||
RunPluginDupFileManager(this.id, this.value, true);
|
||||
RunPluginDupFileManager(ID, Value, true);
|
||||
}
|
||||
else if (this.id.startsWith("tag_duplicates_task"))
|
||||
else if (ID.startsWith("tag_duplicates_task"))
|
||||
{
|
||||
RunPluginDupFileManager("tag_duplicates_task", this.value + ":" + $("#significantTimeDiff").val(), true);
|
||||
RunPluginDupFileManager("tag_duplicates_task", GetReportCreateOptions(Value), true);
|
||||
}
|
||||
else if (this.id.startsWith("create_duplicate_report_task"))
|
||||
else if (ID.startsWith("create_duplicate_report_task"))
|
||||
{
|
||||
RunPluginDupFileManager("create_duplicate_report_task", this.value + ":" + $("#significantTimeDiff").val(), true);
|
||||
RunPluginDupFileManager("create_duplicate_report_task", GetReportCreateOptions(Value), true);
|
||||
}
|
||||
else if (this.id === "viewreport")
|
||||
else if (ID === "viewreport")
|
||||
{
|
||||
var reportUrl = window.location.href;
|
||||
reportUrl = reportUrl.replace("advance_options.html", "report/DuplicateTagScenes.html");
|
||||
console.log("reportUrl = " + reportUrl);
|
||||
window.open(reportUrl, "_blank");
|
||||
}
|
||||
else if (this.id === "pathToDelete" || this.id === "pathToDeleteBlacklist")
|
||||
else if (ID === "viewStashPlugin")
|
||||
window.open(GetStashTabUrl("plugins"), "_blank");
|
||||
else if (ID === "viewStashTools")
|
||||
window.open(GetStashTabUrl("tools"), "_blank");
|
||||
else if (ID === "pathToDelete" || ID === "pathToDeleteBlacklist")
|
||||
{
|
||||
if (confirm("Are you sure you want to delete tag scenes " + blackliststr + "having _DuplicateMarkForDeletion tags, and in path " + $("#pathToDeleteText").val() + AddedWarn))
|
||||
RunPluginDupFileManager(this.id, $("#pathToDeleteText").val(), true, $("#DupTagOnlyCheck").prop('checked'));
|
||||
RunPluginDupFileManager(ID, $("#pathToDeleteText").val(), true, $("#DupTagOnlyCheck").prop('checked'));
|
||||
}
|
||||
else if (this.id === "sizeToDeleteLess" || this.id === "sizeToDeleteGreater" || this.id === "sizeToDeleteBlacklistLess" || this.id === "sizeToDeleteBlacklistGreater")
|
||||
else if (ID === "sizeToDeleteLess" || ID === "sizeToDeleteGreater" || ID === "sizeToDeleteBlacklistLess" || ID === "sizeToDeleteBlacklistGreater")
|
||||
{
|
||||
if (confirm("Are you sure you want to delete duplicate tag scenes " + blackliststr + "having file size " + comparestr + $("#sizeToDelete").val() + AddedWarn))
|
||||
RunPluginDupFileManager(this.id, $("#sizeToDelete").val(), true, $("#DupTagOnlyCheck").prop('checked'));
|
||||
RunPluginDupFileManager(ID, $("#sizeToDelete").val(), true, $("#DupTagOnlyCheck").prop('checked'));
|
||||
}
|
||||
else if (this.id === "durationToDeleteLess" || this.id === "durationToDeleteGreater" || this.id === "durationToDeleteBlacklistLess" || this.id === "durationToDeleteBlacklistGreater")
|
||||
else if (ID === "durationToDeleteLess" || ID === "durationToDeleteGreater" || ID === "durationToDeleteBlacklistLess" || ID === "durationToDeleteBlacklistGreater")
|
||||
{
|
||||
if (confirm("Are you sure you want to delete duplicate tag scenes " + blackliststr + "having file duration " + comparestr + $("#durationToDelete").val() + AddedWarn))
|
||||
RunPluginDupFileManager(this.id, $("#durationToDelete").val(), true, $("#DupTagOnlyCheck").prop('checked'));
|
||||
RunPluginDupFileManager(ID, $("#durationToDelete").val(), true, $("#DupTagOnlyCheck").prop('checked'));
|
||||
}
|
||||
else if (this.id === "commonResToDeleteLess" || this.id === "commonResToDeleteEq" || this.id === "commonResToDeleteGreater" || this.id === "commonResToDeleteBlacklistLess" || this.id === "commonResToDeleteBlacklistEq" || this.id === "commonResToDeleteBlacklistGreater")
|
||||
else if (ID === "commonResToDeleteLess" || ID === "commonResToDeleteEq" || ID === "commonResToDeleteGreater" || ID === "commonResToDeleteBlacklistLess" || ID === "commonResToDeleteBlacklistEq" || ID === "commonResToDeleteBlacklistGreater")
|
||||
{
|
||||
if (confirm("Are you sure you want to delete duplicate tag scenes " + blackliststr + "having resolution " + comparestr + $("#commonResToDelete").val() + AddedWarn))
|
||||
RunPluginDupFileManager(this.id, $("#commonResToDelete").val(), true, $("#DupTagOnlyCheck").prop('checked'));
|
||||
RunPluginDupFileManager(ID, $("#commonResToDelete").val(), true, $("#DupTagOnlyCheck").prop('checked'));
|
||||
}
|
||||
else if (this.id === "resolutionToDeleteLess" || this.id === "resolutionToDeleteEq" || this.id === "resolutionToDeleteGreater" || this.id === "resolutionToDeleteBlacklistLess" || this.id === "resolutionToDeleteBlacklistEq" || this.id === "resolutionToDeleteBlacklistGreater")
|
||||
else if (ID === "resolutionToDeleteLess" || ID === "resolutionToDeleteEq" || ID === "resolutionToDeleteGreater" || ID === "resolutionToDeleteBlacklistLess" || ID === "resolutionToDeleteBlacklistEq" || ID === "resolutionToDeleteBlacklistGreater")
|
||||
{
|
||||
if (confirm("Are you sure you want to delete duplicate tag scenes " + blackliststr + "having resolution " + comparestr + $("#resolutionToDelete").val() + AddedWarn))
|
||||
RunPluginDupFileManager(this.id, $("#resolutionToDelete").val(), true, $("#DupTagOnlyCheck").prop('checked'));
|
||||
RunPluginDupFileManager(ID, $("#resolutionToDelete").val(), true, $("#DupTagOnlyCheck").prop('checked'));
|
||||
}
|
||||
else if (this.id === "ratingToDeleteLess" || this.id === "ratingToDeleteEq" || this.id === "ratingToDeleteGreater" || this.id === "ratingToDeleteBlacklistLess" || this.id === "ratingToDeleteBlacklistEq" || this.id === "ratingToDeleteBlacklistGreater")
|
||||
else if (ID === "ratingToDeleteLess" || ID === "ratingToDeleteEq" || ID === "ratingToDeleteGreater" || ID === "ratingToDeleteBlacklistLess" || ID === "ratingToDeleteBlacklistEq" || ID === "ratingToDeleteBlacklistGreater")
|
||||
{
|
||||
let result = 0;
|
||||
if ($("#ratingToDelete").val() == 1 && comparestr === "less than ")
|
||||
@@ -197,36 +166,36 @@ $(document).ready(function(){
|
||||
else
|
||||
result = confirm("Are you sure you want to delete duplicate tag scenes " + blackliststr + "having rating " + comparestr + $("#ratingToDelete").val() + AddedWarn);
|
||||
if (result)
|
||||
RunPluginDupFileManager(this.id, $("#ratingToDelete").val(), true, $("#DupTagOnlyCheck").prop('checked'));
|
||||
RunPluginDupFileManager(ID, $("#ratingToDelete").val(), true, $("#DupTagOnlyCheck").prop('checked'));
|
||||
}
|
||||
else if (this.id === "tagToDelete" || this.id === "tagToDeleteBlacklist")
|
||||
else if (ID === "tagToDelete" || ID === "tagToDeleteBlacklist")
|
||||
{
|
||||
if (confirm("Are you sure you want to delete tag scenes " + blackliststr + "having _DuplicateMarkForDeletion tags, and having tag " + $("#tagToDeleteText").val() + AddedWarn))
|
||||
RunPluginDupFileManager(this.id, $("#tagToDeleteText").val(), true, $("#DupTagOnlyCheck").prop('checked'));
|
||||
RunPluginDupFileManager(ID, $("#tagToDeleteText").val(), true, $("#DupTagOnlyCheck").prop('checked'));
|
||||
}
|
||||
else if (this.id === "titleToDelete" || this.id === "titleToDeleteBlacklist")
|
||||
else if (ID === "titleToDelete" || ID === "titleToDeleteBlacklist")
|
||||
{
|
||||
if (confirm("Are you sure you want to delete tag scenes " + blackliststr + "having _DuplicateMarkForDeletion tags, and having title containing " + $("#titleToDeleteText").val() + AddedWarn))
|
||||
RunPluginDupFileManager(this.id, $("#titleToDeleteText").val(), true, $("#DupTagOnlyCheck").prop('checked'));
|
||||
RunPluginDupFileManager(ID, $("#titleToDeleteText").val(), true, $("#DupTagOnlyCheck").prop('checked'));
|
||||
}
|
||||
else if (this.id === "pathStrToDelete" || this.id === "pathStrToDeleteBlacklist")
|
||||
else if (ID === "pathStrToDelete" || ID === "pathStrToDeleteBlacklist")
|
||||
{
|
||||
if (confirm("Are you sure you want to delete tag scenes " + blackliststr + "having _DuplicateMarkForDeletion tags, and having path containing " + $("#pathStrToDeleteText").val() + AddedWarn))
|
||||
RunPluginDupFileManager(this.id, $("#pathStrToDeleteText").val(), true, $("#DupTagOnlyCheck").prop('checked'));
|
||||
RunPluginDupFileManager(ID, $("#pathStrToDeleteText").val(), true, $("#DupTagOnlyCheck").prop('checked'));
|
||||
}
|
||||
else if (this.id === "fileNotExistToDelete" || this.id === "fileNotExistToDeleteBlacklist")
|
||||
else if (ID === "fileNotExistToDelete" || ID === "fileNotExistToDeleteBlacklist")
|
||||
{
|
||||
if (confirm("Are you sure you want to delete tag scenes " + blackliststr + "having _DuplicateMarkForDeletion tags, and that do NOT exist in the file system?"))
|
||||
RunPluginDupFileManager(this.id, true, true, $("#DupTagOnlyCheck").prop('checked'));
|
||||
RunPluginDupFileManager(ID, true, true, $("#DupTagOnlyCheck").prop('checked'));
|
||||
}
|
||||
else if (this.id === "applyCombo" || this.id === "applyCombo_" || this.id === "applyComboBlacklist" || this.id === "applyComboGraylist" || this.id === "applyComboPinklist")
|
||||
else if (ID === "applyCombo" || ID === "applyCombo_" || ID === "applyComboBlacklist" || ID === "applyComboGraylist" || ID === "applyComboPinklist")
|
||||
{
|
||||
var Blacklist = "";
|
||||
if (this.id === "applyComboBlacklist")
|
||||
if (ID === "applyComboBlacklist")
|
||||
Blacklist = "Blacklist";
|
||||
else if (this.id === "applyComboGraylist")
|
||||
else if (ID === "applyComboGraylist")
|
||||
Blacklist = "Graylist";
|
||||
else if (this.id === "applyComboPinklist")
|
||||
else if (ID === "applyComboPinklist")
|
||||
Blacklist = "Pinklist";
|
||||
var Param = "{";
|
||||
if ($("#InPathCheck").prop('checked'))
|
||||
@@ -267,9 +236,61 @@ $(document).ready(function(){
|
||||
}
|
||||
console.log(Param);
|
||||
if (confirm("Are you sure you want to delete tag scenes " + blackliststr + "having _DuplicateMarkForDeletion tags, and having the selected options" + AddedWarn + "\nSelected options:\n" + Param))
|
||||
RunPluginDupFileManager(this.id, Param, true);
|
||||
RunPluginDupFileManager(ID, Param, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
$(document).ready(function(){
|
||||
if ($("#IncludePreviewImage").prop('checked')){
|
||||
$("#ImagePreviewSize").prop('disabled', false);
|
||||
$("#ImagePreviewPopupSize").prop('disabled', false);
|
||||
}
|
||||
else{
|
||||
$("#ImagePreviewSize").prop('disabled', true);
|
||||
$("#ImagePreviewPopupSize").prop('disabled', true);
|
||||
}
|
||||
if ($("#IncludePreviewVideo").prop('checked')){
|
||||
$("#streamOverPreview").prop('disabled', false);
|
||||
$("#VideoPreviewWidth").prop('disabled', false);
|
||||
$("#VideoPreviewHeight").prop('disabled', false);
|
||||
}
|
||||
else{
|
||||
$("#streamOverPreview").prop('disabled', true);
|
||||
$("#VideoPreviewWidth").prop('disabled', true);
|
||||
$("#VideoPreviewHeight").prop('disabled', true);
|
||||
}
|
||||
$("button").click(function(){
|
||||
ProcessClick(this);
|
||||
});
|
||||
$("a").click(function(){
|
||||
ProcessClick(this);
|
||||
});
|
||||
$("div").click(function(){
|
||||
if (this.id.startsWith("btn_mnu"))
|
||||
return;
|
||||
ProcessClick(this);
|
||||
});
|
||||
$("#IncludePreviewImage").change(function() {
|
||||
if(this.checked){
|
||||
$("#ImagePreviewSize").prop('disabled', false);
|
||||
$("#ImagePreviewPopupSize").prop('disabled', false);
|
||||
}
|
||||
else{
|
||||
$("#ImagePreviewSize").prop('disabled', true);
|
||||
$("#ImagePreviewPopupSize").prop('disabled', true);
|
||||
}
|
||||
});
|
||||
$("#IncludePreviewVideo").change(function() {
|
||||
if(this.checked){
|
||||
$("#streamOverPreview").prop('disabled', false);
|
||||
$("#VideoPreviewWidth").prop('disabled', false);
|
||||
$("#VideoPreviewHeight").prop('disabled', false);
|
||||
}
|
||||
else{
|
||||
$("#streamOverPreview").prop('disabled', true);
|
||||
$("#VideoPreviewWidth").prop('disabled', true);
|
||||
$("#VideoPreviewHeight").prop('disabled', true);
|
||||
}
|
||||
});
|
||||
});
|
||||
function DeleteDupInPath(){
|
||||
alert('Something went wrong!!!');
|
||||
@@ -277,55 +298,62 @@ function DeleteDupInPath(){
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<center><table style="color:darkgreen;background-color:powderblue;">
|
||||
<tr><th><div><b style="color:red;"><i>DupFileManager</i></b></div>Advance Duplicate File Deletion Menu</th><th>Apply Multiple Options</th></tr>
|
||||
<center>
|
||||
<div class="easyui-accordion" data-options="multiple:true" style="width:800px;">
|
||||
<div title="Menu" data-options="iconCls:'icon-ok'" style="overflow:auto;padding:10px;">
|
||||
<center>
|
||||
<table style="color:darkgreen;background-color:powderblue;">
|
||||
<tr><th><div><b style="color:red;"><i>DupFileManager</i></b></div>Advance Duplicate File Menu</th><th>Apply Multiple Options</th></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="border-collapse: collapse; border: none;">
|
||||
<tr><th colspan="3" style="font-size: 12px;border: none;">Create report overriding user [Match Duplicate Distance] and [significantTimeDiff] settings</th></tr>
|
||||
<tr><th colspan="3" style="font-size: 12px;border: none;">Create report overriding user [Match Duplicate Distance] and other user settings</th></tr>
|
||||
<tr>
|
||||
<td style="border: none;"><div class="dropdown">
|
||||
<button type="button" id="create_duplicate_report_task" value="-1" title="Create new report WITHOUT tags using user settings for [Match Duplicate Distance].">Create Duplicate Report <i class="fa fa-caret-down"></i></button>
|
||||
<div class="dropdown-content">
|
||||
<div><button type="button" id="create_duplicate_report_task0a" value="0" title="Create report using [Match Duplicate Distance]=0 (Exact Match). NO tagging.">Create Duplicate Report [Exact Match]</button></div>
|
||||
<div><button type="button" id="create_duplicate_report_task1a" value="1" title="Create report using [Match Duplicate Distance]=1 (High Match). NO tagging.">Create Duplicate Report [High Match]</button></div>
|
||||
<div><button type="button" id="create_duplicate_report_task2a" value="2" title="Create report using [Match Duplicate Distance]=2 (Medium Match). NO tagging.">Create Duplicate Report [Medium Match]</button></div>
|
||||
<div><button type="button" id="create_duplicate_report_task3a" value="3" title="Create report using [Match Duplicate Distance]=3 (Low Match). NO tagging.">Create Duplicate Report [Low Match]</button></div>
|
||||
<div style="height:2px;width:220px;border-width:0;color:gray;background-color:gray;">_</div>
|
||||
<div><button type="button" id="tag_duplicates_task" value="-1" title="Create new report which tags duplicates with tag name _DuplicateMarkForDeletion using user settings for [Match Duplicate Distance].">Create Duplicate Report with Tagging (With Default Match Setting)</button></div>
|
||||
<div><button type="button" id="tag_duplicates_task0a" value="0" title="Create report which tags duplicates with tag name _DuplicateMarkForDeletion_0 and using [Match Duplicate Distance]=0 (Exact Match).">Create Duplicate Tagging Report [Exact Match]</button></div>
|
||||
<div><button type="button" id="tag_duplicates_task1a" value="1" title="Create report which tags duplicates with tag name _DuplicateMarkForDeletion_1 and using [Match Duplicate Distance]=1 (High Match).">Create Duplicate Tagging Report [High Match]</button></div>
|
||||
<div><button type="button" id="tag_duplicates_task2a" value="2" title="Create report which tags duplicates with tag name _DuplicateMarkForDeletion_2 and using [Match Duplicate Distance]=2 (Medium Match).">Create Duplicate Tagging Report [Medium Match]</button></div>
|
||||
<div><button type="button" id="tag_duplicates_task3a" value="3" title="Create report which tags duplicates with tag name _DuplicateMarkForDeletion_3 and using [Match Duplicate Distance]=3 (Low Match).">Create Duplicate Tagging Report [Low Match]</button></div>
|
||||
<td style="border: none;padding: 0 15px;">
|
||||
<div class="easyui-panel" style="width:380px">
|
||||
<a iconCls="icon-documents" class="easyui-splitbutton easyui-tooltip" menu="#btn_mnu1" id="create_duplicate_report_task" value="-1" title="Create new report WITHOUT tags using user DupFileManager plugin settings. All settings in below [Create Report Options] are ignored.">Create Duplicate Report</a>
|
||||
<button iconCls="icon-view-eye" type="button" id="viewreport" class="easyui-linkbutton easyui-tooltip" title="View duplicate file report.">View Dup Report</button>
|
||||
<a iconCls="icon-menu-3-lines" type="button" id="viewreport" class="easyui-menubutton" menu="#btn_mnu3"></a>
|
||||
</div>
|
||||
<div id="btn_mnu1">
|
||||
<div iconCls="icon-document-number-0" id="create_duplicate_report_task0a" value="0" title="Create report using [Match Duplicate Distance]=0 (Exact Match). NO tagging.">Create Duplicate Report [Exact Match]</div>
|
||||
<div iconCls="icon-document-number-1" id="create_duplicate_report_task1a" value="1" title="Create report using [Match Duplicate Distance]=1 (High Match). NO tagging.">Create Duplicate Report [High Match]</div>
|
||||
<div iconCls="icon-document-number-2" id="create_duplicate_report_task2a" value="2" title="Create report using [Match Duplicate Distance]=2 (Medium Match). NO tagging.">Create Duplicate Report [Medium Match]</div>
|
||||
<div iconCls="icon-document-number-3" id="create_duplicate_report_task3a" value="3" title="Create report using [Match Duplicate Distance]=3 (Low Match). NO tagging.">Create Duplicate Report [Low Match]</div>
|
||||
<div class="menu-sep"></div>
|
||||
<div iconCls="icon-tag-0" id="tag_duplicates_task0a" value="0" title="Create report which tags duplicates with tag name _DuplicateMarkForDeletion_0 and using [Match Duplicate Distance]=0 (Exact Match).">Create Duplicate Tagging Report [Exact Match]</div>
|
||||
<div iconCls="icon-tag-1" id="tag_duplicates_task1a" value="1" title="Create report which tags duplicates with tag name _DuplicateMarkForDeletion_1 and using [Match Duplicate Distance]=1 (High Match).">Create Duplicate Tagging Report [High Match]</div>
|
||||
<div iconCls="icon-tag-2" id="tag_duplicates_task2a" value="2" title="Create report which tags duplicates with tag name _DuplicateMarkForDeletion_2 and using [Match Duplicate Distance]=2 (Medium Match).">Create Duplicate Tagging Report [Medium Match]</div>
|
||||
<div iconCls="icon-tag-3" id="tag_duplicates_task3a" value="3" class="easyui-tooltip" title="Create report which tags duplicates with tag name _DuplicateMarkForDeletion_3 and using [Match Duplicate Distance]=3 (Low Match).">Create Duplicate Tagging Report [Low Match]</div>
|
||||
</div>
|
||||
<div id="btn_mnu3">
|
||||
<div iconCls="icon-more"><a href="https://github.com/David-Maisonave/Axter-Stash/tree/main/plugins" target="_blank" rel="noopener noreferrer">Axter-Stash Plugins</a></div>
|
||||
<div class="menu-sep"></div>
|
||||
<div iconCls="icon-menu1" id="viewStashPlugin" title="View Stash plugins menu.">Stash Plugins</div>
|
||||
<div iconCls="icon-menu-blue" id="viewStashTools" title="View Stash tools menu.">Stash Tools</div>
|
||||
</div>
|
||||
</div></td>
|
||||
<td style="border: none;padding: 0 15px;">
|
||||
<label for="significantTimeDiff" title="Significant time difference setting, where 1 equals 100% and (.9) equals 90%.">Time Difference%:</label>
|
||||
<input type="number" min="0.25" max="1.00" step="0.01" id="significantTimeDiff" name="significantTimeDiff" title="Significant time difference setting, where 1 equals 100% and (.9) equals 90%." value="0.90">
|
||||
</td>
|
||||
<td style="border: none;padding: 0 15px;">
|
||||
<button type="button" id="viewreport" title="View duplicate file report.">View Dup Report</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<center>Multi-Options: <button id="applyCombo" title="Apply selected multiple options to delete scenes.">Delete <i class="fa fa-caret-down"></i></button></center>
|
||||
<div class="dropdown-content">
|
||||
<div><button type="button" id="applyCombo_" title="Apply selected multiple options to delete scenes.">Delete All Candidates</button></div>
|
||||
<div><button type="button" id="applyComboBlacklist" title="Apply selected multiple options to delete scenes in blacklist.">Delete-Blacklist</button></div>
|
||||
<div><button type="button" id="applyComboGraylist" title="Apply selected multiple options to delete scenes in graylist.">Delete-Graylist</button></div>
|
||||
<div><button type="button" id="applyComboPinklist" title="Apply selected multiple options to delete scenes in pinklist.">Delete-Pinklist</button></div>
|
||||
</div>
|
||||
<div style="height:28px;">
|
||||
<a iconCls="icon-cancel" class="easyui-splitbutton easyui-button easyui-tooltip" menu="#btn_mnu2" id="applyCombo" value="" title="Apply selected multiple options to delete scenes.">Delete</a>
|
||||
</div>
|
||||
<div id="btn_mnu2">
|
||||
<div iconCls="icon-no" id="applyCombo_" title="Apply selected multiple options to delete scenes.">Delete All Candidates</div>
|
||||
<div class="menu-sep"></div>
|
||||
<div iconCls="icon-black-x" id="applyComboBlacklist" title="Apply selected multiple options to delete scenes in blacklist.">Delete-Blacklist</div>
|
||||
<div iconCls="icon-gray-x" id="applyComboGraylist" title="Apply selected multiple options to delete scenes in graylist.">Delete-Graylist</div>
|
||||
<div iconCls="icon-pink-x" id="applyComboPinklist" class="easyui-tooltip" title="Apply selected multiple options to delete scenes in pinklist.">Delete-Pinklist</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label title="When enabled, operations only apply to scenes which have the special tag _DuplicateMarkForDeletion_?" for="DupTagOnlyCheck">Apply action only to scenes with <b>_DuplicateMarkForDeletion_?</b> tag:</label><input title="When enabled, operations only apply to scenes which have the special tag _DuplicateMarkForDeletion_?" type="checkbox" id="DupTagOnlyCheck" name="DupTagOnlyCheck" value="true"></td>
|
||||
<td><label title="When enabled, operations only apply to scenes which have the special tag _DuplicateMarkForDeletion_?" for="DupTagOnlyCheck">Apply action only to scenes with <b>_DuplicateMarkForDeletion_?</b> tag:</label><input class="easyui-tooltip" title="When enabled, operations only apply to scenes which have the special tag _DuplicateMarkForDeletion_?" type="checkbox" id="DupTagOnlyCheck" name="DupTagOnlyCheck" value="true"></td>
|
||||
<td>
|
||||
<label for="tagOrFlagCombobox">TagOrFlag:</label>
|
||||
<select id="tagOrFlagCombobox" name="tagOrFlagCombobox">
|
||||
<label for="tagOrFlagCombobox" class="easyui-tooltip" title="Select if a [Multi-Options] operation only apply to scenes which have the specified flag or the special [_DuplicateMarkForDeletion_] tag.">TagOrFlag:</label>
|
||||
<select id="tagOrFlagCombobox" name="tagOrFlagCombobox" class="easyui-tooltip" title="Select if a [Multi-Options] operation only apply to scenes which have the specified flag or the special [_DuplicateMarkForDeletion_] tag.">
|
||||
<option value="" selected="selected"></option>
|
||||
<option value="TagOnlyScenes" title="When selected, Multi-Options operations only apply to scenes which have the special tag _DuplicateMarkForDeletion_?">Dup Tag</option>
|
||||
<option value="YellowFlag" style="background-color:Yellow;" title="When selected, Multi-Options operations only apply to scenes with [Yellow] fag.">Yellow Flag</option>
|
||||
@@ -347,7 +375,7 @@ function DeleteDupInPath(){
|
||||
<button type="button" id="pathToDeleteBlacklist" title="Delete blacklist tagged duplicates having file path">Del Blacklist Dup in Path</button>
|
||||
</form>
|
||||
</td>
|
||||
<td><label for="InPathCheck">In-Path:</label><input type="checkbox" id="InPathCheck" name="InPathCheck" value="true"></td>
|
||||
<td><label for="InPathCheck">In-Path:</label><input type="checkbox" class="easyui-tooltip" title="Select to require file to be in folder specified in path field." id="InPathCheck" name="InPathCheck" value="true"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><form id="sizeToDeleteForm" action="javascript:DeleteDupInPath();" target="_self">
|
||||
@@ -442,32 +470,32 @@ function DeleteDupInPath(){
|
||||
</tr>
|
||||
<tr>
|
||||
<td><form id="titleToDeleteForm" action="javascript:DeleteDupInPath();" target="_self">
|
||||
<label for="titleToDelete" title="Scene having value in title.">Title:</label>
|
||||
<input type="text" id="titleToDeleteText" name="titleToDelete" title="String to search for in title." placeholder="mature" value="">
|
||||
<label for="titleToDelete" class="easyui-tooltip" title="Scene having value in title.">Title:</label>
|
||||
<input type="text" id="titleToDeleteText" name="titleToDelete" class="easyui-tooltip" title="String to search for in title." placeholder="mature" value="">
|
||||
<label for="titleToDelete">All:</label>
|
||||
<button type="button" id="titleToDelete" title="Delete tagged duplicates with title name including value">Contains</button>
|
||||
<label for="titleToDeleteBlacklist">Blacklist:</label>
|
||||
<button type="button" id="titleToDeleteBlacklist" title="Delete blacklist tagged duplicates with title name including value">Contains</button>
|
||||
</form>
|
||||
</td>
|
||||
<td><label for="containTitleCheck">Contains Title:</label><input type="checkbox" id="containTitleCheck" name="containTitleCheck" value="true"></td>
|
||||
<td><label for="containTitleCheck">Contains Title:</label><input type="checkbox" class="easyui-tooltip" title="Select to include content of title field in the multiple option requirement." id="containTitleCheck" name="containTitleCheck" value="true"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><form id="pathStrToDeleteForm" action="javascript:DeleteDupInPath();" target="_self">
|
||||
<label for="pathStrToDelete" pathStr="Scene having value in path.">Path String:</label>
|
||||
<input type="text" id="pathStrToDeleteText" name="pathStrToDelete" pathStr="String to search for in path." placeholder="blond" value="">
|
||||
<label for="pathStrToDelete" title="Scene having value in file path.">Path String:</label>
|
||||
<input type="text" id="pathStrToDeleteText" name="pathStrToDelete" class="easyui-tooltip" title="String to search for in file path." placeholder="blond" value="">
|
||||
<label for="pathStrToDelete">All:</label>
|
||||
<button type="button" id="pathStrToDelete" pathStr="Delete tagged duplicates with path having value">Contains</button>
|
||||
<button type="button" id="pathStrToDelete" title="Delete tagged duplicates with path having value">Contains</button>
|
||||
<label for="pathStrToDeleteBlacklist">Blacklist:</label>
|
||||
<button type="button" id="pathStrToDeleteBlacklist" pathStr="Delete blacklist tagged duplicates with path having value">Contains</button>
|
||||
<button type="button" id="pathStrToDeleteBlacklist" title="Delete blacklist tagged duplicates with path having value">Contains</button>
|
||||
</form>
|
||||
</td>
|
||||
<td><label for="containStrInPathCheck">Text in Path:</label><input type="checkbox" id="containStrInPathCheck" name="containStrInPathCheck" value="true"></td>
|
||||
<td><label for="containStrInPathCheck">Text in Path:</label><input type="checkbox" class="easyui-tooltip" title="Select to include string in path field as part of the multiple option requirement." id="containStrInPathCheck" name="containStrInPathCheck" value="true"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><form id="ratingToDeleteForm" action="javascript:DeleteDupInPath();" target="_self">
|
||||
<label for="ratingToDelete" title="Scene rating.">Rating:</label>
|
||||
<input type="number" min="1" max="5" id="ratingToDelete" name="ratingToDelete" title="Scene rating (1, 2, 3, 4, or 5)" value="1">
|
||||
<input type="number" min="1" max="5" id="ratingToDelete" name="ratingToDelete" class="easyui-tooltip" title="Scene rating (1, 2, 3, 4, or 5)" value="1">
|
||||
<label for="ratingToDeleteLess">All:</label>
|
||||
<button type="button" id="ratingToDeleteLess" title="Delete tagged duplicates with file rating less than"><</button>
|
||||
<button type="button" id="ratingToDeleteEq" title="Delete tagged duplicates with rating equal to">=</button>
|
||||
@@ -494,7 +522,7 @@ function DeleteDupInPath(){
|
||||
<label for="fileNotExistToDeleteBlacklist">Blacklist:</label>
|
||||
<button type="button" id="fileNotExistToDeleteBlacklist" title="Delete blacklist tagged duplicates for which file does NOT exist.">Delete Files That do Not Exist</button>
|
||||
</td>
|
||||
<td><label for="fileNotExistCheck">File Not Exist:</label><input type="checkbox" id="fileNotExistCheck" name="fileNotExistCheck" value="true"></td>
|
||||
<td><label for="fileNotExistCheck">File Not Exist:</label><input type="checkbox" class="easyui-tooltip" title="Select to require deletion candidates to have file missing." id="fileNotExistCheck" name="fileNotExistCheck" value="true"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><form id="resolutionToDeleteForm" action="javascript:DeleteDupInPath();" target="_self">
|
||||
@@ -1925,33 +1953,109 @@ function DeleteDupInPath(){
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div title="Create Report Options" data-options="iconCls:'icon-menu2'" style="overflow:auto;padding:10px;">
|
||||
<center>
|
||||
<table style="color:darkgreen;background-color:powderblue;">
|
||||
<tr><th colspan="3">
|
||||
These options override the UI plugin user settings and the DupFileManager_config.py settings.
|
||||
<div style="font-size: 10px;">These options apply to <b>[Create Duplicate Report]</b> <b style="color:red;background-color:yellow">sub-menu</b> options, that have specific <b style="color:red;background-color:yellow">match</b> value.</div>
|
||||
</th></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="easyui-tooltip" title="Significant time difference setting, where 1 equals 100% and (.9) equals 90%. Default value is 0.90.">
|
||||
<label for="significantTimeDiff">Time Difference%:</label><input type="number" min="0.25" max="1.00" step="0.01" id="significantTimeDiff" name="significantTimeDiff" value="0.90">
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="easyui-tooltip" title="Number of scenes per page in report. Default value is 100."><label for="scenesPerPage">Scenes Per Page:</label><input type="number" min="25" max="5000" step="25" id="scenesPerPage" name="scenesPerPage" value="100"></div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="easyui-tooltip" title="The minimum time difference in seconds for report to highlight scene time. This is the time difference between [Duplicate-to-Delete] scene and [Scene-ToKeep]. Default value is 3."><label for="TimeDiffHighlight">Time Diff Highlight:</label><input type="number" min="1" max="300" step="1" id="TimeDiffHighlight" name="TimeDiffHighlight" value="3"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="easyui-tooltip" title="Create report with preview image."><label for="IncludePreviewImage">Include Preview Image:</label><input type="checkbox" id="IncludePreviewImage" name="IncludePreviewImage" value="true"></div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="easyui-tooltip" title="This value is the size of preview image. Default value is 140."><label for="ImagePreviewSize">Preview Image Size:</label><input type="number" min="50" max="600" step="10" id="ImagePreviewSize" name="ImagePreviewSize" value="140"></div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="easyui-tooltip" title="This value is the size of the popup window when mouse hovers over the image. Default value is 600."><label for="ImagePreviewPopupSize">Image Popup Size:</label><input type="number" min="200" max="3000" step="100" id="ImagePreviewPopupSize" name="ImagePreviewPopupSize" value="600"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan="3">
|
||||
<div class="easyui-tooltip" title="Maximum quantity of duplicates to process. This option is normally used ONLY for testing purposes. Set to zero to disable maximum. Default value is 0."><label for="maxDupToProcess">Maximum Duplicates to Process:</label><input type="number" min="0" max="100000" step="10" id="maxDupToProcess" name="maxDupToProcess" value="0"></div>
|
||||
</td></tr>
|
||||
<tr><td colspan="3">
|
||||
<div><b>Note:</b> Color entries can be a color name, or it can be a hexadecimal value in the form: <b style="color:red;">#rrggbb</b></div>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="easyui-tooltip" title="The main background color for the report. Default color is #f0f5f5, which is a light gray color in most monitors."><label for="ReportBackgroundColor">Report Background Color:</label><input type="text" id="ReportBackgroundColor" name="ReportBackgroundColor" value="#f0f5f5"></div>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<div class="easyui-tooltip" title="The main text color for the report. Default color is black."><label for="ReportTextColor">Report Text Color:</label><input type="text" id="ReportTextColor" name="ReportTextColor" value="black"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="easyui-tooltip" title="Major highlight color for details with higher resolution or duration on the left side. In other words, when [Duplicate-to-Delete] may have a better video than [Duplicate-to-Keep]. Default color is yellow."><label for="SupperHighlight">Main Highlight Color:</label><input type="text" id="SupperHighlight" name="SupperHighlight" value="yellow"></div>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<div class="easyui-tooltip" title="Text color for details with different resolution, duration, size, bitrate,codec, or framerate. Default color is violet."><label for="DetailDiffTextColor">Text Color for Data Differences:</label><input type="text" id="DetailDiffTextColor" name="DetailDiffTextColor" value="violet"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div class="easyui-tooltip" title="Lower highlight for details with slightly higher duration. Default color is nyanza, which is a very pale yellowish-green color."><label for="LowerHighlight">Minor Highlight Color:</label><input type="text" id="LowerHighlight" name="LowerHighlight" value="nyanza"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td rowspan="2">
|
||||
<div class="easyui-tooltip" title="Create report with preview video."><label for="IncludePreviewVideo">Include Preview Video:</label><input type="checkbox" id="IncludePreviewVideo" name="IncludePreviewVideo" value="true" checked></div>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<div class="easyui-tooltip" title="Create report with full video available in the preview section instead of a partial video. This option works in Chrome, but does not work so well in firefox."><label for="streamOverPreview">For preview, display full stream video instead of partial preview video:</label><input type="checkbox" id="streamOverPreview" name="streamOverPreview" value="true"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div class="easyui-tooltip" title="The size of preview video width. Default value is 160."><label for="VideoPreviewWidth">Preview Video Width:</label><input type="number" min="50" max="600" step="10" id="VideoPreviewWidth" name="VideoPreviewWidth" value="160"></div></td>
|
||||
<td><div class="easyui-tooltip" title="The size of preview video height. Default value is 120."><label for="VideoPreviewHeight">Preview Video Height:</label><input type="number" min="50" max="600" step="10" id="VideoPreviewHeight" name="VideoPreviewHeight" value="120"></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</div>
|
||||
<div title="Help" data-options="iconCls:'icon-help', selected:'false'" style="padding:10px;">
|
||||
<table style="color:darkgreen;background-color:powderblue;">
|
||||
<tr><td style="font-size: 12px;" colspan="2">
|
||||
<b>Details:</b>
|
||||
<ol type="I" style="padding-left: 16px;">
|
||||
<li>Match Duplicate Distance Number Details</li>
|
||||
<ol type="1" start="0" style="padding-left: 16px;">
|
||||
<li><b style="color:red;">Exact Match</b></li>
|
||||
<ol type="a" style="padding-left: 16px;">
|
||||
<ol type="A" style="padding-left: 16px;">
|
||||
<li>Safest and most reliable option</li>
|
||||
<li>Uses tag name _DuplicateMarkForDeletion<b>_0</b></li>
|
||||
<li>Has the fewest results, and it's very rare to have false matches.</li>
|
||||
</ol>
|
||||
<li><b style="color:red;">High Match</b></li>
|
||||
<ol type="a" style="padding-left: 16px;">
|
||||
<ol type="A" style="padding-left: 16px;">
|
||||
<li>Recommended Setting</li>
|
||||
<li>Safe and usually reliable</li>
|
||||
<li>Uses tag name _DuplicateMarkForDeletion<b>_1</b></li>
|
||||
<li>Scenes tagged by Exact Match will have both tags (_DuplicateMarkForDeletion_0 and _DuplicateMarkForDeletion_1)</li>
|
||||
</ol>
|
||||
<li><b style="color:red;">Medium Match</b></li>
|
||||
<ol type="a" style="padding-left: 16px;">
|
||||
<ol type="A" style="padding-left: 16px;">
|
||||
<li>Not so safe. Some false matches</li>
|
||||
<li>To reduce false matches use a time difference of .96 or higher.</li>
|
||||
<li>Uses tag name _DuplicateMarkForDeletion<b>_2</b></li>
|
||||
<li>Scenes tagged by 0 and 1 will have three tags.</li>
|
||||
</ol>
|
||||
<li><b style="color:red;">Low Match</b></li>
|
||||
<ol type="a" style="padding-left: 16px;">
|
||||
<ol type="A" style="padding-left: 16px;">
|
||||
<li>Unsafe, and many false matches</li>
|
||||
<li>To reduce false matches use a time difference of .98 or higher.</li>
|
||||
<li>Uses tag name _DuplicateMarkForDeletion<b>_3</b></li>
|
||||
@@ -1963,7 +2067,7 @@ function DeleteDupInPath(){
|
||||
<ol type="1" style="padding-left: 16px;">
|
||||
<li>Significant time difference setting, where 1 equals 100% and (.9) equals 90%.</li>
|
||||
<li>This setting overrides the setting in DupFileManager_config.py.</li>
|
||||
<ol type="a" style="padding-left: 16px;">
|
||||
<ol type="A" style="padding-left: 16px;">
|
||||
<li>See setting <b style="color:red;">significantTimeDiff</b> in DupFileManager_config.py</li>
|
||||
</ol>
|
||||
<li>This setting is generally not useful for <b style="color:red;">[Exact Match]</b> reports.</li>
|
||||
@@ -1981,12 +2085,79 @@ function DeleteDupInPath(){
|
||||
<li>The report is created much faster. It usually takes a few seconds to complete.</li>
|
||||
<li>This is the recommended report type to create if the <b>DupFileManager Advance Menu</b> is not needed or desired.</li>
|
||||
</ol>
|
||||
<li><b style="color:red;">Tag V.S. Flag</b></li>
|
||||
<ol type="1" style="padding-left: 16px;">
|
||||
<li>A tag is part Stash scene attributes. Tags are stored in the Stash database.</li>
|
||||
<ol type="A" style="padding-left: 16px;">
|
||||
<li>When a new DupFileManager report is created, it does <b>NOT</b> delete existing tags.</li>
|
||||
</ol>
|
||||
<li>A flag is only used in the reports created by DupFileManager.</li>
|
||||
<ol type="A" style="padding-left: 16px;">
|
||||
<li>If a new report is created, <b>ALL</b> the flags are deleted!</li>
|
||||
<li>Flag Purpose</li>
|
||||
<ol type="a" style="padding-left: 16px;">
|
||||
<li>Allow the user to review the DupFileManager report, and flag files for futher action or flag them as review complete.</li>
|
||||
</ol>
|
||||
<li>The DupFileManager report, has options that allows the user to perform the same action on all files with a selected color flag.</li>
|
||||
<li>The following flag group options are available.</li>
|
||||
<ol type="a" style="padding-left: 16px;">
|
||||
<li>Delete all files with specified flag color.</li>
|
||||
<li>Copy all scene files to assosciated Duplicate-to-Keep file where Duplicate-to-Delete is flaged with specified flag color.</li>
|
||||
<li>Move all scene files to assosciated Duplicate-to-Keep file where Duplicate-to-Delete is flaged with specified flag color.</li>
|
||||
<ol type="i" style="padding-left: 16px;">
|
||||
<li>A move operation also copies the metadata like tags, performers, and galleries.</li>
|
||||
<li>Note: Future versions of this program might also delete the Duplicate-to-Delete scene after successfully coping the file.</li>
|
||||
</ol>
|
||||
<li>Copy tags, performers, and galleries from Duplicate-to-Delete to associated Duplicate-to-Keep.</li>
|
||||
<li>Add exclude tag to all files with specified flag color.</li>
|
||||
</ol>
|
||||
</ol>
|
||||
</ol>
|
||||
<li>List</b></li>
|
||||
<ol type="1" style="padding-left: 16px;">
|
||||
<li>DupFileManager supports 4 types of list that are configured in Stash=>Settings->Plugins->DupFileManager.</li>
|
||||
<ol type="A" style="padding-left: 16px;">
|
||||
<li>Whitelist</li>
|
||||
<ol type="a" style="padding-left: 16px;">
|
||||
<li>A list of protected paths.</li>
|
||||
<li>Videos under these paths are NOT to be deleted.</li>
|
||||
<li>E.g. <b>C:\Favorite\,E:\MustKeep\</b></li>
|
||||
</ol>
|
||||
<li>Graylist</li>
|
||||
<ol type="a" style="padding-left: 16px;">
|
||||
<li>A list of preferential paths.</li>
|
||||
<li>Videos under these paths are only designated for deletion if:</li>
|
||||
<ol type="i" style="padding-left: 16px;">
|
||||
<li>Counter duplicate is in the whitelist.</li>
|
||||
<li>If the video quality is poor compare to blacklist duplicate.</li>
|
||||
</ol>
|
||||
<li>E.g. <b>C:\2nd_Fav\,E:\ShouldKeep\</b></li>
|
||||
</ol>
|
||||
<li>Blacklist</li>
|
||||
<ol type="a" style="padding-left: 16px;">
|
||||
<li>A list of least preferential paths.</li>
|
||||
<li>Videos under these paths are primary candidates for deletion.</li>
|
||||
<li>E.g. <b>C:\Downloads\,E:\DeleteMeFirst\</b></li>
|
||||
</ol>
|
||||
<li>Pinklist</li>
|
||||
<ol type="a" style="padding-left: 16px;">
|
||||
<li>The pinklist is NOT used at all when creating the Duplicate Report.</li>
|
||||
<li>The pinklist is only used in the Advance Menu.</li>
|
||||
<ol type="i" style="padding-left: 16px;">
|
||||
<li>This gives the user additional manual deletion options.</li>
|
||||
<li>This option is similar to the <b>Path</b> field option.</li>
|
||||
</ol>
|
||||
</ol>
|
||||
</ol>
|
||||
<li>Whitelist is not available in the <b style="color:red;">Advance Menu</b> because the paths are designated as protected from deletion.</li>
|
||||
</ol>
|
||||
</ol>
|
||||
</td></tr>
|
||||
</table></center>
|
||||
</table>
|
||||
</div>
|
||||
</center>
|
||||
<div id="div1"></div>
|
||||
|
||||
|
||||
</center>
|
||||
</body></html>
|
||||
|
||||
|
||||
|
||||
51
plugins/DupFileManager/test.html
Normal file
51
plugins/DupFileManager/test.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>menu demo</title>
|
||||
<link rel="stylesheet" href="https://code.jquery.com/ui/1.13.3/themes/smoothness/jquery-ui.css">
|
||||
<style>
|
||||
.ui-menu {
|
||||
width: 200px;
|
||||
}
|
||||
</style>
|
||||
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.13.3/jquery-ui.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<ul id="menu">
|
||||
<li>
|
||||
<div>Item 1</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>Item 2</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>Item 3</div>
|
||||
<ul>
|
||||
<li>
|
||||
<div>Item 3-1</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>Item 3-2</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>Item 3-3</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<div>Item 4</div>
|
||||
</li>
|
||||
<li>
|
||||
<div>Item 5</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<script>
|
||||
$( "#menu" ).menu();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,5 +1,9 @@
|
||||
##### This page was added starting on version 0.2.0 to keep track of newly added features between versions.
|
||||
- Note: Sub versions (x.x.x.**x**) are only listed on this page.
|
||||
- Note:
|
||||
- 4th number sub versions (x.x.x.**x**) are only listed on this page. It's associated with very minor changes or very minor bug fixes.
|
||||
- Changes to the 3rd number (x.x.**x**.x) are related to bug fixes and minor changes.
|
||||
- The 2nd number (x.**x**.x.x) is incremented when new feature(s) is/are added.
|
||||
- The 1st number (**x**.x.x.x) is incremented when a change is not backwardly compatible to an older Stash version, or when an extremely major change is made.
|
||||
### 0.2.0
|
||||
- For report, added logic to transfer option settings **[Disable Complete Confirmation]** and **[Disable Delete Confirmation]** when paginating.
|
||||
- Fixed minor bug in advance_options.html for GQL params.
|
||||
@@ -17,18 +21,18 @@
|
||||
- Added popup gallery list to report which list all galleries associated with scene.
|
||||
- Added popup group list to report which list all groups associated with scene.
|
||||
- After merging tags in report, the report gets updated with the merged scene metadata.
|
||||
- Added graylist deletion option to [**Advance Duplicate File Deletion Menu**].
|
||||
- Added pinklist option to Settings->Plugins->Plugins and to [**Advance Duplicate File Deletion Menu**]
|
||||
- The pinklist is only used with the [**Advance Duplicate File Deletion Menu**], and it's **NOT** used in the primary process to selected candidates for deletion.
|
||||
- Added graylist deletion option to [**Advance Duplicate File Menu**].
|
||||
- Added pinklist option to Settings->Plugins->Plugins and to [**Advance Duplicate File Menu**]
|
||||
- The pinklist is only used with the [**Advance Duplicate File Menu**], and it's **NOT** used in the primary process to selected candidates for deletion.
|
||||
- Advance Menu now works with non-tagged scenes that are in the current report.
|
||||
### 1.0.0
|
||||
- Consolidated buttons and links on report into dropdown buttons.
|
||||
- On report, added dropdown menu options for flags.
|
||||
- Rename Tools-UI advance duplicate tagged menu to [**Advance Duplicate File Deletion Menu**]
|
||||
- When [**Advance Duplicate File Deletion Menu**] completes report, gives user prompt to open the report in browser.
|
||||
- Rename Tools-UI advance duplicate tagged menu to [**Advance Duplicate File Menu**]
|
||||
- When [**Advance Duplicate File Menu**] completes report, gives user prompt to open the report in browser.
|
||||
- Added performance enhancement for removing (clearing) duplicate tags from all scenes by using SQL call.
|
||||
- Added option to report to delete files that do not exist by duplicate candidates in report, as well as by tagged files.
|
||||
- Added logic to disable scene in report if deleted by [**Advance Duplicate File Deletion Menu**]. Note: Requires a refresh.
|
||||
- Added logic to disable scene in report if deleted by [**Advance Duplicate File Menu**]. Note: Requires a refresh.
|
||||
- Added report option to delete by flags set on the report.
|
||||
### 1.0.0.1
|
||||
- Fixed bug with report delete scene request.
|
||||
@@ -42,8 +46,43 @@
|
||||
- Added cookies to report so as to remember user options for Disable Complete Confirmation **[Disable Complete Confirmation]** and **[Disable Delete Confirmation]**.
|
||||
- This change was needed because sometimes the browser refuse to open local URL's with params on the URL.
|
||||
- Using cookies also allows check options status to stay the same after refresh.
|
||||
- Added code to [**Advance Duplicate File Deletion Menu**] to delete based on flags.
|
||||
- Added code to [**Advance Duplicate File Menu**] to delete based on flags.
|
||||
### 1.0.1
|
||||
- Change [**Advance Duplicate File Deletion Menu**] default input values to placeholder text.
|
||||
- Change [**Advance Duplicate File Menu**] default input values to placeholder text.
|
||||
- Change stash toolbar icon for DupFileManager to a file icon with a video camera.
|
||||
- Removed **plugin/** from the URL for the Tools-UI menu.
|
||||
- Removed **plugin/** from the URL for the Tools-UI menu.
|
||||
### 1.1.0
|
||||
- On report, when scene gets deleted using flag option, change the color of the buttons to the associated flag color.
|
||||
- Enhanced [**Advance Duplicate File Menu**] dropdown buttons to splitdown buttons, and added associated icons.
|
||||
- Added refresh button to report.
|
||||
- Ehanced the report GUI.
|
||||
- Replace scene options with a menubar.
|
||||
- Consolidated the options into two menu items (File and Flag/Tag).
|
||||
- Moved metadata icons (Tag, Performer, Gallery, and Group) to the new menubar. These icons are only displayed when the scene has associated metadata.
|
||||
- Added quick access button to the menubar for most commonly used options.
|
||||
- Implemented the logic so quick access buttons are only included if there's space available.
|
||||
- Two of the six quick access buttons are always displayed, and the remaining 4 are displayed depending on how many metadata icons are displayed per scene.
|
||||
- On report, consolidated some menu items into sub menu items.
|
||||
- Added option to [**Advance Duplicate File Menu**] to limit number of scenes in each page for paginate.
|
||||
- Added following color options to [**Advance Duplicate File Menu**].
|
||||
- Report background color
|
||||
- Report text color
|
||||
- Report main highlight color
|
||||
- Report text color for differential metadata
|
||||
- Report minor highlight color
|
||||
- Added option to [**Advance Duplicate File Menu**] to display full stream video as preview in the report.
|
||||
- Change paginate [Prev] and [Next] links to buttons on report.
|
||||
- Add logic to update Stash when changing file without doing full path scan.
|
||||
- Add option to [**Advance Duplicate File Menu**] to open http://localhost:9999/settings?tab=plugins
|
||||
- Add option to [**Advance Duplicate File Menu**] to open http://localhost:9999/settings?tab=tools
|
||||
- Add option to report to open http://localhost:9999/settings?tab=plugins
|
||||
- Add option to report to open http://localhost:9999/settings?tab=tools
|
||||
- Add link to [Axter-Stash](https://github.com/David-Maisonave/Axter-Stash/tree/main/plugins) to both report and [**Advance Duplicate File Menu**].
|
||||
- Added report option to clear all flags of a specific color.
|
||||
- Added option to [**Advance Duplicate File Menu**] to create report with or without preview video and with or without preview image.
|
||||
- Always include [Next] paginate on top of first report page, and CSS hide it if only one page.
|
||||
- Added code to report to make it when the report updates the screen (due to tag merging), it stays in the same row position on the page.
|
||||
- Added plugin task [Create Duplicate Report]
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -830,11 +830,13 @@ class StashPluginHelper(StashInterface):
|
||||
data = data.replace("\\\\\\\\", "\\\\")
|
||||
return json.loads(data)
|
||||
|
||||
def isCorrectDbVersion(self, verNumber = 68):
|
||||
def isCorrectDbVersion(self, verNumber = 68, isEqualOrGreater = True):
|
||||
results = self.sql_query("select version from schema_migrations")
|
||||
# self.Log(results)
|
||||
if len(results['rows']) == 0 or len(results['rows'][0]) == 0:
|
||||
return False
|
||||
if isEqualOrGreater:
|
||||
return int(results['rows'][0][0]) >= verNumber
|
||||
return int(results['rows'][0][0]) == verNumber
|
||||
|
||||
def renameFileNameInDB(self, fileId, oldName, newName, UpdateUsingIdOnly = False):
|
||||
@@ -848,6 +850,11 @@ class StashPluginHelper(StashInterface):
|
||||
return True
|
||||
return False
|
||||
|
||||
# This only works if filename has not changed. If file name has changed, call renameFileNameInDB first.
|
||||
def updateFileScene(self, fullFilePath):
|
||||
mylist = [fullFilePath]
|
||||
return self.metadata_scan(mylist)
|
||||
|
||||
def getFileNameFromDB(self, id):
|
||||
results = self.sql_query(f'select basename from files where id = {id};')
|
||||
self.Trace(f"results = ({results})")
|
||||
@@ -870,6 +877,10 @@ class StashPluginHelper(StashInterface):
|
||||
self.Debug(f"Called sql_commit and received results {results}.")
|
||||
return True
|
||||
|
||||
def isEmpty(self, data):
|
||||
if data == None or len(data) == 0:
|
||||
return True
|
||||
return False
|
||||
|
||||
# ############################################################################################################
|
||||
# Functions which are candidates to be added to parent class use snake_case naming convention.
|
||||
|
||||
@@ -830,11 +830,13 @@ class StashPluginHelper(StashInterface):
|
||||
data = data.replace("\\\\\\\\", "\\\\")
|
||||
return json.loads(data)
|
||||
|
||||
def isCorrectDbVersion(self, verNumber = 68):
|
||||
def isCorrectDbVersion(self, verNumber = 68, isEqualOrGreater = True):
|
||||
results = self.sql_query("select version from schema_migrations")
|
||||
# self.Log(results)
|
||||
if len(results['rows']) == 0 or len(results['rows'][0]) == 0:
|
||||
return False
|
||||
if isEqualOrGreater:
|
||||
return int(results['rows'][0][0]) >= verNumber
|
||||
return int(results['rows'][0][0]) == verNumber
|
||||
|
||||
def renameFileNameInDB(self, fileId, oldName, newName, UpdateUsingIdOnly = False):
|
||||
@@ -848,6 +850,11 @@ class StashPluginHelper(StashInterface):
|
||||
return True
|
||||
return False
|
||||
|
||||
# This only works if filename has not changed. If file name has changed, call renameFileNameInDB first.
|
||||
def updateFileScene(self, fullFilePath):
|
||||
mylist = [fullFilePath]
|
||||
return self.metadata_scan(mylist)
|
||||
|
||||
def getFileNameFromDB(self, id):
|
||||
results = self.sql_query(f'select basename from files where id = {id};')
|
||||
self.Trace(f"results = ({results})")
|
||||
@@ -870,6 +877,10 @@ class StashPluginHelper(StashInterface):
|
||||
self.Debug(f"Called sql_commit and received results {results}.")
|
||||
return True
|
||||
|
||||
def isEmpty(self, data):
|
||||
if data == None or len(data) == 0:
|
||||
return True
|
||||
return False
|
||||
|
||||
# ############################################################################################################
|
||||
# Functions which are candidates to be added to parent class use snake_case naming convention.
|
||||
|
||||
Reference in New Issue
Block a user