From 1a52873bf3535b1423ef888a59696abf17d53435 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 6 Feb 2024 12:22:35 +0100 Subject: [PATCH] use first frame from poster icon for edits --- app/static/js/edits.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/static/js/edits.js b/app/static/js/edits.js index 6dcb1f5..d81a5d0 100644 --- a/app/static/js/edits.js +++ b/app/static/js/edits.js @@ -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