19 lines
No EOL
426 B
JavaScript
19 lines
No EOL
426 B
JavaScript
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)
|
|
video.metadata = JSON.parse(video.metadata || '{}')
|
|
delete video.banner_alt_prefix
|
|
delete video.media_alt_prefix
|
|
return video
|
|
} |