mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-02 19:07:40 +01:00
talkinghead check: always check also whether the module is enabled
This commit is contained in:
parent
9e8f3e0def
commit
169b1c2c63
@ -530,8 +530,8 @@ function handleImageChange() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isTalkingHeadEnabled()) {
|
||||
// Method get IP of endpoint
|
||||
if (isTalkingHeadEnabled() && modules.includes('talkinghead')) {
|
||||
const talkingheadResultFeedSrc = `${getApiUrl()}/api/talkinghead/result_feed`;
|
||||
$('#expression-holder').css({ display: '' });
|
||||
if (imgElement.src !== talkingheadResultFeedSrc) {
|
||||
@ -882,7 +882,7 @@ async function setSpriteSlashCommand(_, spriteId) {
|
||||
const currentLastMessage = getLastCharacterMessage();
|
||||
const spriteFolderName = getSpriteFolderName(currentLastMessage, currentLastMessage.name);
|
||||
let label = spriteId;
|
||||
if (!isTalkingHeadEnabled()) {
|
||||
if (!isTalkingHeadEnabled() || !modules.includes('talkinghead')) {
|
||||
await validateImages(spriteFolderName);
|
||||
|
||||
// Fuzzy search for sprite
|
||||
@ -1150,7 +1150,7 @@ async function getExpressionsList() {
|
||||
}
|
||||
|
||||
async function setExpression(character, expression, force) {
|
||||
if (!isTalkingHeadEnabled()) {
|
||||
if (!isTalkingHeadEnabled() || !modules.includes('talkinghead')) {
|
||||
console.debug('entered setExpressions');
|
||||
await validateImages(character);
|
||||
const img = $('img.expression');
|
||||
@ -1415,8 +1415,8 @@ async function onClickExpressionUpload(event) {
|
||||
// Reset the input
|
||||
e.target.form.reset();
|
||||
|
||||
if (isTalkingHeadEnabled() && id === 'talkinghead') {
|
||||
// In Talkinghead mode, when a new talkinghead image is uploaded, refresh the live char.
|
||||
if (id === 'talkinghead' && isTalkingHeadEnabled() && modules.includes('talkinghead')) {
|
||||
await loadTalkingHead();
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user