use source if available

This commit is contained in:
j 2023-08-17 12:27:40 +02:00
parent 253c313881
commit 4ca97aac04

View file

@ -40,9 +40,10 @@ async function loadData(id, args) {
if (id.split('/').length == 1 || id.split('/')[1] == 'info') {
data.view = 'info'
data.title = data.item.title
data.byline = data.item.director ? data.item.director.join(', ') : ''
if (!data.byline && data.item.source) {
if (data.item.source) {
data.byline = data.item.source
} else {
data.byline = data.item.director ? data.item.director.join(', ') : ''
}
data.link = `${pandora.proto}://${data.site}/${data.item.id}/info`
let poster = pandora.site.user.ui.icons == 'posters' ? 'poster' : 'icon'
@ -124,9 +125,10 @@ async function loadData(id, args) {
data.value = value.join('\n')
data.title = data.item.title
data.byline = data.item.director ? data.item.director.join(', ') : ''
if (!data.byline && data.item.source) {
if (data.item.source) {
data.byline = data.item.source
} else {
data.byline = data.item.director ? data.item.director.join(', ') : ''
}
data.link = `${pandora.proto}://${data.site}/${data.item.id}/${data["in"]},${data.out}`
data.poster = `${pandora.proto}://${data.site}/${data.item.id}/480p${data["in"]}.jpg`