|
|
@ -616,6 +616,7 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
this.detailElem.children[0].innerHTML = escapeHtml(data.title);
|
|
|
|
this.detailElem.children[0].innerHTML = escapeHtml(data.title);
|
|
|
|
this.detailElem.children[1].innerHTML = escapeHtml(data.year);
|
|
|
|
this.detailElem.children[1].innerHTML = escapeHtml(data.year);
|
|
|
|
(this.detailElem.children[1] as HTMLElement).dataset.year = escapeHtml(data.year);
|
|
|
|
(this.detailElem.children[1] as HTMLElement).dataset.year = escapeHtml(data.year);
|
|
|
|
|
|
|
|
console.log(data.rating);
|
|
|
|
this.detailElem.children[2].innerHTML = `${(data.duration !== undefined
|
|
|
|
this.detailElem.children[2].innerHTML = `${(data.duration !== undefined
|
|
|
|
? `<span class='minutesDetail'>${Math.round(
|
|
|
|
? `<span class='minutesDetail'>${Math.round(
|
|
|
|
parseInt(escapeHtml(data.duration), 10) / 60 / 1000
|
|
|
|
parseInt(escapeHtml(data.duration), 10) / 60 / 1000
|
|
|
@ -625,9 +626,9 @@ class PlexMeetsHomeAssistant extends HTMLElement {
|
|
|
|
? `<span class='contentRatingDetail'>${escapeHtml(data.contentRating)}</span>`
|
|
|
|
? `<span class='contentRatingDetail'>${escapeHtml(data.contentRating)}</span>`
|
|
|
|
: '') +
|
|
|
|
: '') +
|
|
|
|
(data.rating !== undefined
|
|
|
|
(data.rating !== undefined
|
|
|
|
? `<span class='ratingDetail'>${data.rating < 5 ? '🗑' : '⭐'} ${escapeHtml(
|
|
|
|
? `<span class='ratingDetail'>${data.rating < 5 ? '🗑' : '⭐'} ${Math.round(
|
|
|
|
data.rating
|
|
|
|
parseFloat(escapeHtml(data.rating)) * 10
|
|
|
|
)}</span>`
|
|
|
|
) / 10}</span>`
|
|
|
|
: '')}<div class='clear'></div>`;
|
|
|
|
: '')}<div class='clear'></div>`;
|
|
|
|
this.detailElem.children[3].innerHTML = escapeHtml(data.summary);
|
|
|
|
this.detailElem.children[3].innerHTML = escapeHtml(data.summary);
|
|
|
|
/* todo temp disabled
|
|
|
|
/* todo temp disabled
|
|
|
|