Fix premiere text

This commit is contained in:
Preston 2020-06-25 13:54:50 -04:00
parent 6bb8009051
commit f96bee7768
1 changed files with 3 additions and 2 deletions

View File

@ -155,8 +155,9 @@ function displayVideo(videoData, listType = '') {
let published = new Date(videoData.published * 1000);
let hours = 0;
if (now < published.getTime()) {
video.publishedDate = 'Premieres on ' + published.toLocaleString();
if (videoData.isUpcoming) {
const premiereDate = new Date(videoData.premiereTimestamp * 1000);
video.publishedDate = 'Premieres on ' + premiereDate.toLocaleString();
} else {
if (time >= 3600) {
hours = Math.floor(time / 3600);