2023-11-09 09:44:04 +00:00
|
|
|
import { parseMediaAndBanner } from "../../base/util.mjs"
|
|
|
|
|
|
|
|
export function parseVideos(videos) {
|
|
|
|
for (let i = 0; i < videos.length; i++) {
|
|
|
|
parseVideo(videos[i])
|
|
|
|
}
|
|
|
|
return videos
|
|
|
|
}
|
|
|
|
|
|
|
|
export function parseVideo(video) {
|
|
|
|
if (!video) {
|
|
|
|
return null
|
|
|
|
}
|
|
|
|
parseMediaAndBanner(video)
|
2023-11-20 07:12:08 +00:00
|
|
|
video.metadata = JSON.parse(video.metadata || '{}')
|
|
|
|
delete video.banner_alt_prefix
|
|
|
|
delete video.media_alt_prefix
|
2023-11-09 09:44:04 +00:00
|
|
|
return video
|
|
|
|
}
|