use first frame from poster icon for edits

This commit is contained in:
j 2024-02-06 12:22:35 +01:00
parent 5a2b7b56d3
commit 1a52873bf3

View file

@ -235,7 +235,12 @@ async function loadEdit(id, args) {
data.title = data.edit.name
data.byline = data.edit.description
data.link = `${pandora.proto}://${data.site}/edits/${data.edit.id}`
data.poster = data.videos[0].src.split('/48')[0] + `/480p${data.videos[0].in}.jpg`
const poster = data.posterFrames[0]
if (poster) {
data.poster = `${pandora.proto}://${data.site}/${poster.item}/480p${poster.position}.jpg`
} else {
data.poster = data.videos[0].src.split('/48')[0] + `/480p${data.videos[0].in}.jpg`
}
data.aspectratio = data.edit.clips[0].videoRatio
data.duration = data.edit.duration
return data