use first frame from poster icon for edits
This commit is contained in:
parent
5a2b7b56d3
commit
1a52873bf3
1 changed files with 6 additions and 1 deletions
|
@ -235,7 +235,12 @@ async function loadEdit(id, args) {
|
||||||
data.title = data.edit.name
|
data.title = data.edit.name
|
||||||
data.byline = data.edit.description
|
data.byline = data.edit.description
|
||||||
data.link = `${pandora.proto}://${data.site}/edits/${data.edit.id}`
|
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.aspectratio = data.edit.clips[0].videoRatio
|
||||||
data.duration = data.edit.duration
|
data.duration = data.edit.duration
|
||||||
return data
|
return data
|
||||||
|
|
Loading…
Reference in a new issue