Merged PR 2266: update media tabs display and query

update media tabs display and query

Related work items: #22698
This commit is contained in:
Robert Bond
2026-04-22 11:38:04 +00:00
parent 20782db916
commit b0004381ed
7 changed files with 48 additions and 128 deletions
+4 -4
View File
@@ -459,7 +459,7 @@ const MediaDetails = ({ mediaObj, whichTab, title, useNoCookie = true }) => {
.map((item) => {
const link = isWelsh
? item.pinswg_mediaLinkCY
: item.pinswg_mediaLinkEN;
: item.pinswg_videoplatformurl;
const videoId = extractYouTubeId(link);
if (!videoId) return null;
@@ -468,15 +468,15 @@ const MediaDetails = ({ mediaObj, whichTab, title, useNoCookie = true }) => {
key:
item.pinswg_documentid ||
item.pinswg_mediaid ||
`${item.pinswg_name}-${videoId}`,
`${item.pinswg_eventrecordingid}-${videoId}`,
videoId,
name: item.pinswg_name || "Video",
name: item.pinswg_eventrecordingname || "Video",
description: item.pinswg_description || "",
// If you later store duration in CRM, map it here (e.g. "03:42")
duration: item.pinswg_duration || null,
thumbnailHQ: `https://img.youtube.com/vi/${videoId}/hqdefault.jpg`,
thumbnailMax: `https://img.youtube.com/vi/${videoId}/maxresdefault.jpg`,
raw: item,
raw: item
};
})
.filter(Boolean);