Add official blip asset management.
This commit is contained in:
parent
6c1ba0aa13
commit
93d1a264da
|
@ -0,0 +1 @@
|
||||||
|
Put bgm audio files here
|
|
@ -1,8 +1,7 @@
|
||||||
/*
|
/*
|
||||||
TODO:
|
TODO:
|
||||||
- Check failed install file (0kb size ?)
|
|
||||||
*/
|
*/
|
||||||
//const DEBUG_TONY_SAMA_FORK_MODE = false
|
//const DEBUG_TONY_SAMA_FORK_MODE = true
|
||||||
|
|
||||||
import { getRequestHeaders, callPopup } from "../../../script.js";
|
import { getRequestHeaders, callPopup } from "../../../script.js";
|
||||||
import { deleteExtension, extensionNames, installExtension } from "../../extensions.js";
|
import { deleteExtension, extensionNames, installExtension } from "../../extensions.js";
|
||||||
|
@ -60,7 +59,7 @@ function downloadAssetsList(url) {
|
||||||
element.append(label);
|
element.append(label);
|
||||||
|
|
||||||
//if (DEBUG_TONY_SAMA_FORK_MODE)
|
//if (DEBUG_TONY_SAMA_FORK_MODE)
|
||||||
// assetUrl = assetUrl.replace("https://github.com/SillyTavern/","https://github.com/Tony-sama/"); // DBG
|
// asset["url"] = asset["url"].replace("https://github.com/SillyTavern/","https://github.com/Tony-sama/"); // DBG
|
||||||
|
|
||||||
console.debug(DEBUG_PREFIX, "Checking asset", asset["id"], asset["url"]);
|
console.debug(DEBUG_PREFIX, "Checking asset", asset["id"], asset["url"]);
|
||||||
|
|
||||||
|
@ -115,7 +114,7 @@ function downloadAssetsList(url) {
|
||||||
element.on("click", assetInstall);
|
element.on("click", assetInstall);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.debug(DEBUG_PREFIX, "Created element for BGM", asset["id"])
|
console.debug(DEBUG_PREFIX, "Created element for ", asset["id"])
|
||||||
|
|
||||||
const displayName = DOMPurify.sanitize(asset["name"] || asset["id"]);
|
const displayName = DOMPurify.sanitize(asset["name"] || asset["id"]);
|
||||||
const description = DOMPurify.sanitize(asset["description"] || "");
|
const description = DOMPurify.sanitize(asset["description"] || "");
|
||||||
|
|
|
@ -5,7 +5,7 @@ const fetch = require('node-fetch').default;
|
||||||
const { finished } = require('stream/promises');
|
const { finished } = require('stream/promises');
|
||||||
const { DIRECTORIES, UNSAFE_EXTENSIONS } = require('./constants');
|
const { DIRECTORIES, UNSAFE_EXTENSIONS } = require('./constants');
|
||||||
|
|
||||||
const VALID_CATEGORIES = ["bgm", "ambient"];
|
const VALID_CATEGORIES = ["bgm", "ambient", "blip"];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sanitizes the input filename for theasset.
|
* Sanitizes the input filename for theasset.
|
||||||
|
|
Loading…
Reference in New Issue