Use character name for gallery URL

This commit is contained in:
Cohee 2025-02-28 10:49:15 +02:00
parent 76e45abfc6
commit 5555b3e7db

View File

@ -171,7 +171,7 @@ async function showCharGallery() {
let url = selected_group || this_chid; let url = selected_group || this_chid;
if (!selected_group && this_chid !== undefined) { if (!selected_group && this_chid !== undefined) {
const char = characters[this_chid]; const char = characters[this_chid];
url = char.avatar.replace('.png', ''); url = char.name;
} }
const items = await getGalleryItems(url); const items = await getGalleryItems(url);
@ -457,7 +457,7 @@ async function listGalleryCommand(args) {
let url = args.char ?? (args.group ? groups.find(it => it.name == args.group)?.id : null) ?? (selected_group || this_chid); let url = args.char ?? (args.group ? groups.find(it => it.name == args.group)?.id : null) ?? (selected_group || this_chid);
if (!args.char && !args.group && !selected_group && this_chid !== undefined) { if (!args.char && !args.group && !selected_group && this_chid !== undefined) {
const char = characters[this_chid]; const char = characters[this_chid];
url = char.avatar.replace('.png', ''); url = char.name;
} }
const items = await getGalleryItems(url); const items = await getGalleryItems(url);