feat(exporter,viewer): item media (video) and THG gallery cross-links (#1434)
Commit: bd417c27fb4f4925fc4122bd19e261f49b018e28
Date: 2026-07-06 15:53:21 +0200
Author: PascalHavelange
Commit Message
feat(exporter,viewer): item media (video) and THG gallery cross-links (#1434)
Findings from the Epic 3 research pass (tmp/islamicart-epic3-research-2026-07-06.md),
corrected after review and implemented as pure exporter/viewer changes --
no importer work needed, the underlying data was already there:
- item_media (video/audio): already fully imported via ItemMediaImporter
(phase-08) into a dedicated item_media table/ItemMedia model -- 5 rows
for ISL today. item-exporter.ts now reads it and adds a `media[]` field
per item; ItemDetail.vue renders a "Related Video" section, preferring
the active content language and falling back to any available one.
- THG (Thematic Gallery) cross-links: 908 ISL items are already attached
to 48 THG gallery collections via collection_item, from
ThgGalleryMwnf3{Object,Monument}Importer (phase-10) -- invisible until
now because collection-exporter.ts correctly never exports THG's own
(out-of-scope, separate-site) collection tree. item-exporter.ts adds a
lightweight `thg_galleries[]` field via a query scoped to the
`mwnf3_thematic_gallery:thg_gallery:` backward_compatibility prefix,
without exporting THG'\''s collections at all. ItemDetail.vue renders a
"Galleries" section.
Per direction: the real legacy per-gallery-family base URLs
(thg_gallery_url, 45 rows, confirmed not read by any importer) aren'\''t
worth capturing since THG is due for a rewrite -- gallery links use a
placeholder `#ThematicGallery-{name}` anchor instead of a real URL.
Verified against the live inventory-app DB and a local (unpublished) test
export: 2130 ISL+EPM items get a populated thg_galleries field, 17 get a
populated media field, matching the live DB counts.
Co-authored-by: Pascal HAVELANGE <havelangep@hotmail.com>
Files Changed
- 📝 Modified:
scripts/exporter/src/exporters/item-exporter.ts - 📝 Modified:
scripts/viewer/package-lock.json - 📝 Modified:
scripts/viewer/package.json - 📝 Modified:
scripts/viewer/src/views/ItemDetail.vue
Links
This documentation was automatically generated from Git commit data.