fallback to source

This commit is contained in:
j 2023-08-17 12:04:23 +02:00
parent 4c69a332af
commit 253c313881
2 changed files with 8 additions and 0 deletions

View file

@ -10,6 +10,7 @@ async function loadData(id, args) {
"id", "id",
"title", "title",
"director", "director",
"source",
"summary", "summary",
"streams", "streams",
"duration", "duration",
@ -40,6 +41,9 @@ async function loadData(id, args) {
data.view = 'info' data.view = 'info'
data.title = data.item.title data.title = data.item.title
data.byline = data.item.director ? data.item.director.join(', ') : '' data.byline = data.item.director ? data.item.director.join(', ') : ''
if (!data.byline && data.item.source) {
data.byline = data.item.source
}
data.link = `${pandora.proto}://${data.site}/${data.item.id}/info` data.link = `${pandora.proto}://${data.site}/${data.item.id}/info`
let poster = pandora.site.user.ui.icons == 'posters' ? 'poster' : 'icon' let poster = pandora.site.user.ui.icons == 'posters' ? 'poster' : 'icon'
data.icon = `${pandora.proto}://${data.site}/${data.item.id}/${poster}.jpg` data.icon = `${pandora.proto}://${data.site}/${data.item.id}/${poster}.jpg`
@ -121,6 +125,9 @@ async function loadData(id, args) {
data.title = data.item.title data.title = data.item.title
data.byline = data.item.director ? data.item.director.join(', ') : '' data.byline = data.item.director ? data.item.director.join(', ') : ''
if (!data.byline && data.item.source) {
data.byline = data.item.source
}
data.link = `${pandora.proto}://${data.site}/${data.item.id}/${data["in"]},${data.out}` 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` data.poster = `${pandora.proto}://${data.site}/${data.item.id}/480p${data["in"]}.jpg`
data.aspectratio = data.item.videoRatio data.aspectratio = data.item.videoRatio

View file

@ -1,6 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block head %} {% block head %}
<link rel="alternate" type="application/atom+xml" title="{{ settings.SITENAME }}" href="/atom.xml" /> <link rel="alternate" type="application/atom+xml" title="{{ settings.SITENAME }}" href="/atom.xml" />
<title>{{ settings.SITENAME }}</title>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<style> <style>