mirror of
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
synced 2026-03-02 11:50:24 +00:00
Also move the TacUtils class into the namespace for consistency
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
.replace("<l:", "")
|
||||
.replace("<", "");
|
||||
let filterCondition = (x) => {
|
||||
let regex = new RegExp(TacUtils.escapeRegExp(searchTerm, true), "i");
|
||||
let regex = new RegExp(TAC.Utils.escapeRegExp(searchTerm, true), "i");
|
||||
return (
|
||||
regex.test(x.toLowerCase()) ||
|
||||
regex.test(x.toLowerCase().replaceAll(" ", "_"))
|
||||
@@ -52,7 +52,7 @@
|
||||
if (TAC.Globals.lycos.length === 0) {
|
||||
try {
|
||||
TAC.Globals.lycos = (
|
||||
await TacUtils.loadCSV(`${TAC.Globals.tagBasePath}/temp/lyco.txt`)
|
||||
await TAC.Utils.loadCSV(`${TAC.Globals.tagBasePath}/temp/lyco.txt`)
|
||||
)
|
||||
.filter((x) => x[0]?.trim().length > 0) // Remove empty lines
|
||||
.map((x) => [x[0]?.trim(), x[1], x[2]]); // Trim filenames and return the name, sortKey, hash pairs
|
||||
@@ -65,7 +65,7 @@
|
||||
async function sanitize(tagType, text) {
|
||||
if (tagType === TAC.ResultType.lyco) {
|
||||
let multiplier = TAC.CFG.extraNetworksDefaultMultiplier;
|
||||
let info = await TacUtils.fetchAPI(`tacapi/v1/lyco-info/${text}`);
|
||||
let info = await TAC.Utils.fetchAPI(`tacapi/v1/lyco-info/${text}`);
|
||||
if (info && info["preferred weight"]) {
|
||||
multiplier = info["preferred weight"];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user