fix(ii): add Konachan support in sidebar

This commit is contained in:
Hugo Hsi
2026-04-14 01:58:37 -04:00
parent 36e0c3fddc
commit 14f8b84635
4 changed files with 20 additions and 7 deletions
@@ -16,9 +16,20 @@ Process {
return StringUtils.shellSingleQuoteEscape(FileUtils.trimFileProtocol(filePath));
}
function processSourceUrl() {
return StringUtils.shellSingleQuoteEscape(sourceUrl);
}
function curlUserAgentArg() {
if (!downloadUserAgent) {
return "";
}
return ` -H 'User-Agent: ${StringUtils.shellSingleQuoteEscape(downloadUserAgent)}'`;
}
running: true
command: ["bash", "-c",
`mkdir -p $(dirname '${processFilePath()}'); [ -f '${processFilePath()}' ] || curl -sSL '${sourceUrl}' -o '${processFilePath()}' && file '${processFilePath()}'`
`mkdir -p $(dirname '${processFilePath()}'); [ -f '${processFilePath()}' ] || curl -sSL '${processSourceUrl()}'${curlUserAgentArg()} -o '${processFilePath()}' && file '${processFilePath()}'`
]
stdout: StdioCollector {
id: imageSizeOutputCollector