feat: replace tv show icon
This commit is contained in:
@@ -23,7 +23,7 @@ type ImageParams = {
|
||||
const log = createLogger("api/image");
|
||||
|
||||
async function getRemoteImage(image: string) {
|
||||
log.debug("[api/image] fetching", { image });
|
||||
log.debug("fetching", { image });
|
||||
const sourceRes = await fetch(image);
|
||||
if (!sourceRes.ok) {
|
||||
return "Error retrieving image from URL.";
|
||||
@@ -68,6 +68,10 @@ function modifyImage(
|
||||
format = MagickFormat.Webp;
|
||||
}
|
||||
|
||||
if (params.mediaType === "image/png") {
|
||||
format = MagickFormat.Png;
|
||||
}
|
||||
|
||||
ImageMagick.read(imageBuffer, format, (image) => {
|
||||
const sizingData = getWidthHeight(image, params);
|
||||
if (params.mode === "resize") {
|
||||
|
@@ -22,6 +22,11 @@ export const handler: Handlers = {
|
||||
filter_by.push(`type:=${type}`);
|
||||
}
|
||||
|
||||
const status = url.searchParams.get("status");
|
||||
if (status) {
|
||||
filter_by.push(`status:=${status}`);
|
||||
}
|
||||
|
||||
const hashTags = extractHashTags(query);
|
||||
if (hashTags?.length) {
|
||||
filter_by.push(`tags:[${hashTags.map((t) => `\`${t}\``).join(",")}]`);
|
||||
|
Reference in New Issue
Block a user