forked from Github/Axter-Stash
Enhanced CreateContainer.cmd
Made command line case insensitive. Added error handling incase use enters command option where stash port should be. Change command option for creating image from PULL to IMAGE, and left PULL so as to be backward compatible.
This commit is contained in:
@@ -6,9 +6,10 @@
|
||||
:: Example with shared mount paths:
|
||||
:: CreateContainer.cmd ContainerName1 "stashapp/stash:latest" 9991 C:\MySharedMountPath C:\Another\Shared\Folder
|
||||
:: Example adding Stash IMAGE and container:
|
||||
:: CreateContainer.cmd v0.27.2 "stashapp/stash:v0.27.2" 9997 PULL
|
||||
:: CreateContainer.cmd NewContainer27.2 "stashapp/stash:v0.27.2" 9997 IMAGE
|
||||
:: Note: The image name (stashapp/stash:v0.27.2) must be an image name listed in following link: https://hub.docker.com/r/stashapp/stash/tags
|
||||
:: Example with DLNA:
|
||||
:: CreateContainer.cmd v272 "stashapp/stash:v0.27.2" 9996 C:\downloads DLNA
|
||||
:: CreateContainer.cmd MyDLNA272 "stashapp/stash:v0.27.2" 9996 C:\downloads DLNA
|
||||
:: Example skipping docker-compose:
|
||||
:: CreateContainer.cmd ContainerName "stashapp/stash:v0.26.2" 9992 C:\Videos SKIP
|
||||
set NewContainerName=%1
|
||||
@@ -29,29 +30,40 @@ set SkipDockerCompose=
|
||||
set DLNAFunctionality="no"
|
||||
set PullDockerStashImage=
|
||||
set MountAccess=":ro"
|
||||
if [%SharedMountPath%]==[DLNA] (set DLNAFunctionality=yes) & (set SharedMountPath=)
|
||||
if [%SharedMountPath%]==[SKIP] (set SkipDockerCompose=yes) & (set SharedMountPath=)
|
||||
if [%SharedMountPath%]==[PULL] (set PullDockerStashImage=yes) & (set SharedMountPath=)
|
||||
if [%SharedMountPath2%]==[DLNA] (set DLNAFunctionality=yes) & (set SharedMountPath2=)
|
||||
if [%SharedMountPath2%]==[SKIP] (set SkipDockerCompose=yes) & (set SharedMountPath2=)
|
||||
if [%SharedMountPath2%]==[PULL] (set PullDockerStashImage=yes) & (set SharedMountPath2=)
|
||||
if [%SharedMountPath2%]==[WRITE] (set MountAccess=) & (set SharedMountPath2=)
|
||||
if [%SharedMountPath3%]==[DLNA] (set DLNAFunctionality=yes) & (set SharedMountPath3=)
|
||||
if [%SharedMountPath3%]==[SKIP] (set SkipDockerCompose=yes) & (set SharedMountPath3=)
|
||||
if [%SharedMountPath3%]==[PULL] (set PullDockerStashImage=yes) & (set SharedMountPath3=)
|
||||
if [%SharedMountPath3%]==[WRITE] (set MountAccess=) & (set SharedMountPath3=)
|
||||
if [%SharedMountPath4%]==[DLNA] (set DLNAFunctionality=yes) & (set SharedMountPath4=)
|
||||
if [%SharedMountPath4%]==[SKIP] (set SkipDockerCompose=yes) & (set SharedMountPath4=)
|
||||
if [%SharedMountPath4%]==[PULL] (set PullDockerStashImage=yes) & (set SharedMountPath4=)
|
||||
if [%SharedMountPath4%]==[WRITE] (set MountAccess=) & (set SharedMountPath4=)
|
||||
if [%SharedMountPath5%]==[DLNA] (set DLNAFunctionality=yes) & (set SharedMountPath5=)
|
||||
if [%SharedMountPath5%]==[SKIP] (set SkipDockerCompose=yes) & (set SharedMountPath5=)
|
||||
if [%SharedMountPath5%]==[PULL] (set PullDockerStashImage=yes) & (set SharedMountPath5=)
|
||||
if [%SharedMountPath5%]==[WRITE] (set MountAccess=) & (set SharedMountPath5=)
|
||||
if [%VariableArg%]==[DLNA] (set DLNAFunctionality=yes)
|
||||
if [%VariableArg%]==[SKIP] (set SkipDockerCompose=yes)
|
||||
if [%VariableArg%]==[PULL] (set PullDockerStashImage=yes)
|
||||
if [%VariableArg%]==[WRITE] (set MountAccess=)
|
||||
if /I [%SharedMountPath%]==[DLNA] (set DLNAFunctionality=yes) & (set SharedMountPath=)
|
||||
if /I [%SharedMountPath%]==[SKIP] (set SkipDockerCompose=yes) & (set SharedMountPath=)
|
||||
if /I [%SharedMountPath%]==[IMAGE] (set PullDockerStashImage=yes) & (set SharedMountPath=)
|
||||
if /I [%SharedMountPath%]==[PULL] (set PullDockerStashImage=yes) & (set SharedMountPath=)
|
||||
if /I [%SharedMountPath2%]==[DLNA] (set DLNAFunctionality=yes) & (set SharedMountPath2=)
|
||||
if /I [%SharedMountPath2%]==[SKIP] (set SkipDockerCompose=yes) & (set SharedMountPath2=)
|
||||
if /I [%SharedMountPath2%]==[IMAGE] (set PullDockerStashImage=yes) & (set SharedMountPath2=)
|
||||
if /I [%SharedMountPath2%]==[PULL] (set PullDockerStashImage=yes) & (set SharedMountPath2=)
|
||||
if /I [%SharedMountPath2%]==[WRITE] (set MountAccess=) & (set SharedMountPath2=)
|
||||
if /I [%SharedMountPath3%]==[DLNA] (set DLNAFunctionality=yes) & (set SharedMountPath3=)
|
||||
if /I [%SharedMountPath3%]==[SKIP] (set SkipDockerCompose=yes) & (set SharedMountPath3=)
|
||||
if /I [%SharedMountPath3%]==[IMAGE] (set PullDockerStashImage=yes) & (set SharedMountPath3=)
|
||||
if /I [%SharedMountPath3%]==[PULL] (set PullDockerStashImage=yes) & (set SharedMountPath3=)
|
||||
if /I [%SharedMountPath3%]==[WRITE] (set MountAccess=) & (set SharedMountPath3=)
|
||||
if /I [%SharedMountPath4%]==[DLNA] (set DLNAFunctionality=yes) & (set SharedMountPath4=)
|
||||
if /I [%SharedMountPath4%]==[SKIP] (set SkipDockerCompose=yes) & (set SharedMountPath4=)
|
||||
if /I [%SharedMountPath4%]==[IMAGE] (set PullDockerStashImage=yes) & (set SharedMountPath4=)
|
||||
if /I [%SharedMountPath4%]==[PULL] (set PullDockerStashImage=yes) & (set SharedMountPath4=)
|
||||
if /I [%SharedMountPath4%]==[WRITE] (set MountAccess=) & (set SharedMountPath4=)
|
||||
if /I [%SharedMountPath5%]==[DLNA] (set DLNAFunctionality=yes) & (set SharedMountPath5=)
|
||||
if /I [%SharedMountPath5%]==[SKIP] (set SkipDockerCompose=yes) & (set SharedMountPath5=)
|
||||
if /I [%SharedMountPath5%]==[IMAGE] (set PullDockerStashImage=yes) & (set SharedMountPath5=)
|
||||
if /I [%SharedMountPath5%]==[PULL] (set PullDockerStashImage=yes) & (set SharedMountPath5=)
|
||||
if /I [%SharedMountPath5%]==[WRITE] (set MountAccess=) & (set SharedMountPath5=)
|
||||
if /I [%VariableArg%]==[DLNA] (set DLNAFunctionality=yes)
|
||||
if /I [%VariableArg%]==[SKIP] (set SkipDockerCompose=yes)
|
||||
if /I [%VariableArg%]==[IMAGE] (set PullDockerStashImage=yes)
|
||||
if /I [%VariableArg%]==[PULL] (set PullDockerStashImage=yes)
|
||||
if /I [%VariableArg%]==[WRITE] (set MountAccess=)
|
||||
:: If user incorrectly enters below arguments instead of Stash-Port, fetch the values, and let CHECK_STASH_PORT get the required Stash-Port.
|
||||
if /I [%STASH_PORT%]==[DLNA] (set DLNAFunctionality=yes) & (set SharedMountPath=)
|
||||
if /I [%STASH_PORT%]==[SKIP] (set SkipDockerCompose=yes) & (set SharedMountPath=)
|
||||
if /I [%STASH_PORT%]==[IMAGE] (set PullDockerStashImage=yes) & (set SharedMountPath=)
|
||||
if /I [%STASH_PORT%]==[PULL] (set PullDockerStashImage=yes) & (set SharedMountPath=)
|
||||
echo SkipDockerCompose = %SkipDockerCompose% ; DLNAFunctionality = %DLNAFunctionality%
|
||||
set DockerComposeFile="docker-compose.yml"
|
||||
|
||||
@@ -59,18 +71,28 @@ if [%NewContainerName%]==[] goto :MissingArgumentNewContainerName
|
||||
goto :HaveVariableNewContainerName
|
||||
:MissingArgumentNewContainerName
|
||||
set /p NewContainerName="Enter the new container name: "
|
||||
if [%NewContainerName%]==[] goto :eof
|
||||
:HaveVariableNewContainerName
|
||||
|
||||
if [%Image%]==[] goto :MissingArgumentImage
|
||||
goto :HaveVariableImage
|
||||
:MissingArgumentImage
|
||||
set /p Image="Enter the image name: "
|
||||
if [%Image%]==[] goto :eof
|
||||
:HaveVariableImage
|
||||
|
||||
:CHECK_STASH_PORT
|
||||
if [%STASH_PORT%]==[] goto :MissingArgumentSTASH_PORT
|
||||
IF 1%STASH_PORT% NEQ +1%STASH_PORT% goto STASH_PORT_NOT_NUMERIC
|
||||
goto :HaveVariableSTASH_PORT
|
||||
:STASH_PORT_NOT_NUMERIC
|
||||
echo Error ******************
|
||||
echo Argument #3 requires a numeric value for Stash-Port. You entered "%STASH_PORT%" instead. Please enter a numberic value for Stash Port.
|
||||
:MissingArgumentSTASH_PORT
|
||||
set STASH_PORT=
|
||||
set /p STASH_PORT="Enter the Stash port number: "
|
||||
if [%STASH_PORT%]==[] Goto :eof
|
||||
goto :CHECK_STASH_PORT
|
||||
:HaveVariableSTASH_PORT
|
||||
|
||||
if exist %NewContainerName%\ (
|
||||
|
||||
@@ -3,21 +3,27 @@ var OrgNextPage = null;
|
||||
var OrgHomePage = null;
|
||||
var RemoveToKeepConfirmValue = null;
|
||||
var RemoveValidatePromptValue = null;
|
||||
var DisableReloadPageValue = null;
|
||||
let thisUrl = "" + window.location;
|
||||
const isAxterCom = (thisUrl.search("axter.com") > -1);
|
||||
console.log("Cookies = " + document.cookie);
|
||||
const StrRemoveToKeepConfirm = "RemoveToKeepConfirm=";
|
||||
const StrRemoveValidatePrompt = "RemoveValidatePrompt=";
|
||||
const StrDisableReloadPage = "DisableReloadPage=";
|
||||
function SetPaginateButtonChange(){
|
||||
var chkBxRemoveValid = document.getElementById("RemoveValidatePrompt");
|
||||
var chkBxDisableDeleteConfirm = document.getElementById("RemoveToKeepConfirm");
|
||||
var chkBxDisableReloadPage = document.getElementById("DisableReloadPage");
|
||||
RemoveToKeepConfirmValue = StrRemoveToKeepConfirm + "false";
|
||||
RemoveValidatePromptValue = StrRemoveValidatePrompt + "false";
|
||||
DisableReloadPageValue = StrDisableReloadPage + "false";
|
||||
if (chkBxRemoveValid.checked)
|
||||
RemoveToKeepConfirmValue = StrRemoveToKeepConfirm + "true";
|
||||
if (chkBxDisableDeleteConfirm.checked)
|
||||
RemoveValidatePromptValue = StrRemoveValidatePrompt + "true";
|
||||
document.cookie = RemoveToKeepConfirmValue + "&" + RemoveValidatePromptValue + "; SameSite=None; Secure";
|
||||
if (chkBxDisableReloadPage != null && chkBxDisableReloadPage.checked)
|
||||
DisableReloadPageValue = StrDisableReloadPage + "true";
|
||||
document.cookie = RemoveToKeepConfirmValue + "&" + RemoveValidatePromptValue + "&" + DisableReloadPageValue + "; SameSite=None; Secure";
|
||||
console.log("Cookies = " + document.cookie);
|
||||
}
|
||||
function trim(str, ch) {
|
||||
@@ -48,9 +54,11 @@ function RunPluginOperation(Mode, ActionID, button, asyncAjax){ // Mode=Value an
|
||||
$('html').removeClass('wait');
|
||||
$("body").css("cursor", "default");
|
||||
}
|
||||
if (Mode.startsWith("copyScene") || Mode.startsWith("renameFile") || Mode === "clearAllSceneFlags" || Mode.startsWith("clearFlag") || Mode.startsWith("mergeScene") || Mode.startsWith("mergeTags") || (Mode !== "deleteScene" && Mode.startsWith("deleteScene")))
|
||||
if (Mode.startsWith("copyScene") || Mode.startsWith("renameFile") || Mode === "clearAllSceneFlags" || Mode.startsWith("clearFlag") || Mode.startsWith("mergeScene") || Mode.startsWith("mergeTags") || (Mode !== "deleteScene" && Mode.startsWith("deleteScene"))){
|
||||
const chkBxDisableReloadPage = document.getElementById("DisableReloadPage");
|
||||
if (chkBxDisableReloadPage == null || !chkBxDisableReloadPage.checked)
|
||||
window.location.reload();
|
||||
else if (!chkBxRemoveValid.checked && Mode !== "flagScene") alert("Action " + Mode + " for scene(s) ID# " + ActionID + " complete.\\n\\nResults=" + result);
|
||||
} else 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);
|
||||
if (asyncAjax){
|
||||
@@ -118,6 +126,8 @@ $(document).ready(function(){
|
||||
console.log("urlParams = " + urlParams);
|
||||
RemoveToKeepConfirmValue = StrRemoveToKeepConfirm + "false";
|
||||
RemoveValidatePromptValue = StrRemoveValidatePrompt + "false";
|
||||
DisableReloadPageValue = StrDisableReloadPage + "false";
|
||||
const chkBxDisableReloadPage = document.getElementById("DisableReloadPage");
|
||||
var FetchCookies = true;
|
||||
if (urlParams.get('RemoveToKeepConfirm') != null && urlParams.get('RemoveToKeepConfirm') !== ""){
|
||||
FetchCookies = false;
|
||||
@@ -136,6 +146,15 @@ $(document).ready(function(){
|
||||
else
|
||||
$( "#RemoveValidatePrompt" ).prop("checked", false);
|
||||
}
|
||||
if (chkBxDisableReloadPage != null && urlParams.get('DisableReloadPage') != null && urlParams.get('DisableReloadPage') !== ""){
|
||||
FetchCookies = false;
|
||||
DisableReloadPageValue = StrDisableReloadPage + urlParams.get('DisableReloadPage');
|
||||
console.log("DisableReloadPageValue = " + DisableReloadPageValue);
|
||||
if (urlParams.get('DisableReloadPage') === "true")
|
||||
$( "#DisableReloadPage" ).prop("checked", true);
|
||||
else
|
||||
$( "#DisableReloadPage" ).prop("checked", false);
|
||||
}
|
||||
if (FetchCookies){
|
||||
console.log("Cookies = " + document.cookie);
|
||||
var cookies = document.cookie;
|
||||
@@ -157,6 +176,15 @@ $(document).ready(function(){
|
||||
else
|
||||
$( "#RemoveValidatePrompt" ).prop("checked", false);
|
||||
}
|
||||
if (chkBxDisableReloadPage != null && cookies.indexOf(StrDisableReloadPage) > -1){
|
||||
var idx = cookies.indexOf(StrDisableReloadPage) + StrDisableReloadPage.length;
|
||||
var s = cookies.substring(idx);
|
||||
console.log("StrDisableReloadPage Cookie = " + s);
|
||||
if (s.startsWith("true"))
|
||||
$( "#DisableReloadPage" ).prop("checked", true);
|
||||
else
|
||||
$( "#DisableReloadPage" ).prop("checked", false);
|
||||
}
|
||||
}
|
||||
SetPaginateButtonChange();
|
||||
function ProcessClick(This_){
|
||||
@@ -254,4 +282,7 @@ $(document).ready(function(){
|
||||
$("#RemoveToKeepConfirm").change(function() {
|
||||
SetPaginateButtonChange();
|
||||
});
|
||||
$("#DisableReloadPage").change(function() {
|
||||
SetPaginateButtonChange();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -120,8 +120,11 @@ var GraphQl_URL = "http://localhost:9999/graphql";
|
||||
</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>
|
||||
<td><input type="checkbox" id="RemoveToKeepConfirm" name="RemoveToKeepConfirm"><label for="RemoveToKeepConfirm" title="Disable confirmation prompts for delete scenes">Disable Delete Confirmation</label><br></td>
|
||||
<td>
|
||||
<input type="checkbox" id="RemoveValidatePrompt" name="RemoveValidatePrompt"><label for="RemoveValidatePrompt" title="Disable notice for task completion (Popup).">Disable Complete Confirmation</label>
|
||||
<input type="checkbox" id="RemoveToKeepConfirm" name="RemoveToKeepConfirm"><label for="RemoveToKeepConfirm" title="Disable confirmation prompts for delete scenes">Disable Delete Confirmation</label>
|
||||
</td>
|
||||
<td><input type="checkbox" id="DisableReloadPage" name="DisableReloadPage"><label for="DisableReloadPage" title="Disable reloading/updating page when making single scene changes.">Disable Updating Page</label><br></td>
|
||||
|
||||
</tr></table></td>
|
||||
</tr></table></center>
|
||||
|
||||
@@ -134,6 +134,7 @@ Users can setup a private or alternate remote site by changing variables **remot
|
||||
### Future Planned Features, Changes, or Fixes
|
||||
- Scheduled Changes
|
||||
- Add option to report to avoid reloading page after updating report. Planned for 1.2.0 Version.
|
||||
- After deleting scene from report, disable preview for the deleted scene on the report. Planned for 1.2.0 Version.
|
||||
- Remove [Max Dup Process] from the Stash->Plugins GUI. This option already exist in advance menu. Planned for 1.2.0 Version.
|
||||
- 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.
|
||||
|
||||
Reference in New Issue
Block a user