Make it so external images are handled correctly by the module

This commit is contained in:
Oliver 2026-02-01 23:14:05 -07:00
parent ef63860922
commit bf7a89e4a7
3 changed files with 6 additions and 2 deletions

View file

@ -8,7 +8,7 @@ const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
const { FormDataExtended } = foundry.applications.ux;
const { deepClone } = foundry.utils;
const PAGE_SIZE = 8;
const PAGE_SIZE = 48;
export class ArtBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
// #region Options
@ -237,6 +237,7 @@ export class ArtBrowser extends HandlebarsApplicationMixin(ApplicationV2) {
// Populate ephemeral data for rendering
image.id = id;
image.selected = this.#selected.has(imagePath(image));
image.path = imagePath(image);
// Convert all of the artist IDs into the actual data
image.artists = image.artists

View file

@ -1,5 +1,8 @@
import { filePath } from "../consts.mjs";
export function imagePath(image) {
if (image.external) {
return image.path;
};
return filePath(image.path);
};