Showing tag poster and photos on tag page. Improved campaign fallback logic, fixes wrong ratio selected.

This commit is contained in:
2025-12-13 04:00:14 +01:00
parent bc26e07812
commit 84b9bbd1b6
8 changed files with 274 additions and 33 deletions

View File

@@ -1,3 +1,5 @@
import { curateEntity } from './entities.js';
export function curateMedia(media, context = {}) {
if (!media) {
return null;
@@ -21,6 +23,11 @@ export function curateMedia(media, context = {}) {
type: mime[0],
subtype: mime[1],
},
comment: media.comment,
entity: media.entity && curateEntity({
...media.entity,
parent: media.entity_parent,
}),
type: context.type || null,
};
}