From 34c4f07df16d258bf8173143fe682b79ca7acbef Mon Sep 17 00:00:00 2001 From: j Date: Thu, 31 Aug 2023 11:49:18 +0100 Subject: [PATCH] show year/date --- app/static/js/item.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/static/js/item.js b/app/static/js/item.js index 6a02483..a9f838b 100644 --- a/app/static/js/item.js +++ b/app/static/js/item.js @@ -10,6 +10,8 @@ async function loadData(id, args) { "id", "title", "director", + "year", + "date", "source", "summary", "streams", @@ -45,6 +47,11 @@ async function loadData(id, args) { } else { data.byline = data.item.director ? data.item.director.join(', ') : '' } + if (data.item.year) { + data.byline += ' (' + data.item.year + ')' + } else if (data.item.date) { + data.byline += ' (' + data.item.date.split('-')[0] + ')' + } data.link = `${pandora.proto}://${data.site}/${data.item.id}/info` let poster = pandora.site.user.ui.icons == 'posters' ? 'poster' : 'icon' data.icon = `${pandora.proto}://${data.site}/${data.item.id}/${poster}.jpg` @@ -135,6 +142,11 @@ async function loadData(id, args) { } else { data.byline = data.item.director ? data.item.director.join(', ') : '' } + if (data.item.year) { + data.byline += ' (' + data.item.year + ')' + } else if (data.item.date) { + data.byline += ' (' + data.item.date.split('-')[0] + ')' + } 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.aspectratio = data.item.videoRatio