Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bea4d931c6 | ||
|
|
49c7077e23 | ||
|
|
ff339b681b | ||
|
|
0e6b03be15 | ||
|
|
772babe9bc | ||
|
|
f8365a5b58 |
@@ -11,10 +11,10 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Jellyfin.Controller" Version="10.9.11" >
|
<PackageReference Include="Jellyfin.Controller" Version="10.11.5" >
|
||||||
<ExcludeAssets>runtime</ExcludeAssets>
|
<ExcludeAssets>runtime</ExcludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Jellyfin.Model" Version="10.9.11">
|
<PackageReference Include="Jellyfin.Model" Version="10.11.5">
|
||||||
<ExcludeAssets>runtime</ExcludeAssets>
|
<ExcludeAssets>runtime</ExcludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -2,7 +2,31 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var POLL_INTERVAL_MS = 1000;
|
var POLL_INTERVAL_MS = 1000;
|
||||||
|
var OVERVIEW_MAX_LENGTH = 160;
|
||||||
var overlayEl = null;
|
var overlayEl = null;
|
||||||
|
var personCache = {};
|
||||||
|
|
||||||
|
function truncate(text, maxLength) {
|
||||||
|
if (text.length <= maxLength) {
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
return text.slice(0, maxLength).trim() + '…';
|
||||||
|
}
|
||||||
|
|
||||||
|
function getPerson(jellyfinId) {
|
||||||
|
if (personCache[jellyfinId]) {
|
||||||
|
return personCache[jellyfinId];
|
||||||
|
}
|
||||||
|
|
||||||
|
var promise = window.ApiClient.getItem(window.ApiClient.getCurrentUserId(), jellyfinId)
|
||||||
|
.catch(function () {
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
|
||||||
|
personCache[jellyfinId] = promise;
|
||||||
|
return promise;
|
||||||
|
}
|
||||||
|
|
||||||
function getNowPlaying() {
|
function getNowPlaying() {
|
||||||
if (!window.ApiClient) {
|
if (!window.ApiClient) {
|
||||||
@@ -56,13 +80,66 @@
|
|||||||
|
|
||||||
actors.forEach(function (actor) {
|
actors.forEach(function (actor) {
|
||||||
var card = document.createElement('div');
|
var card = document.createElement('div');
|
||||||
card.style.background = 'rgba(0, 0, 0, 0.7)';
|
card.className = 'jrayActorCard';
|
||||||
|
card.style.background = 'rgba(0, 0, 0, 0.75)';
|
||||||
card.style.color = '#fff';
|
card.style.color = '#fff';
|
||||||
card.style.padding = '6px 12px';
|
card.style.padding = '8px 12px';
|
||||||
card.style.borderRadius = '4px';
|
card.style.borderRadius = '6px';
|
||||||
card.style.fontSize = '14px';
|
card.style.display = 'flex';
|
||||||
card.textContent = actor.name;
|
card.style.alignItems = 'center';
|
||||||
|
card.style.gap = '10px';
|
||||||
|
card.style.maxWidth = '320px';
|
||||||
|
|
||||||
|
var textBlock = document.createElement('div');
|
||||||
|
|
||||||
|
var name = document.createElement('div');
|
||||||
|
name.style.fontWeight = 'bold';
|
||||||
|
name.style.fontSize = '14px';
|
||||||
|
name.textContent = actor.name;
|
||||||
|
textBlock.appendChild(name);
|
||||||
|
|
||||||
|
card.appendChild(textBlock);
|
||||||
overlayEl.appendChild(card);
|
overlayEl.appendChild(card);
|
||||||
|
|
||||||
|
if (!actor.jellyfin_id || !window.ApiClient) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
card.style.pointerEvents = 'auto';
|
||||||
|
card.style.cursor = 'pointer';
|
||||||
|
card.addEventListener('click', function (event) {
|
||||||
|
event.stopPropagation();
|
||||||
|
window.location.hash = '#/details?id=' + actor.jellyfin_id;
|
||||||
|
});
|
||||||
|
|
||||||
|
getPerson(actor.jellyfin_id).then(function (person) {
|
||||||
|
if (!person || !overlayEl || !overlayEl.contains(card)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (person.ImageTags && person.ImageTags.Primary) {
|
||||||
|
var img = document.createElement('img');
|
||||||
|
img.src = window.ApiClient.getImageUrl(actor.jellyfin_id, {
|
||||||
|
type: 'Primary',
|
||||||
|
maxHeight: 80,
|
||||||
|
tag: person.ImageTags.Primary
|
||||||
|
});
|
||||||
|
img.style.height = '80px';
|
||||||
|
img.style.width = 'auto';
|
||||||
|
img.style.borderRadius = '4px';
|
||||||
|
img.style.objectFit = 'cover';
|
||||||
|
card.insertBefore(img, textBlock);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (person.Overview) {
|
||||||
|
var overview = document.createElement('div');
|
||||||
|
overview.style.fontSize = '12px';
|
||||||
|
overview.style.opacity = '0.85';
|
||||||
|
overview.style.marginTop = '4px';
|
||||||
|
overview.textContent = truncate(person.Overview, OVERVIEW_MAX_LENGTH);
|
||||||
|
textBlock.appendChild(overview);
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
container.appendChild(overlayEl);
|
container.appendChild(overlayEl);
|
||||||
|
|||||||
@@ -7,6 +7,30 @@
|
|||||||
"owner": "dtourolle",
|
"owner": "dtourolle",
|
||||||
"category": "General",
|
"category": "General",
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"version": "0.0.0.0",
|
||||||
|
"changelog": "Latest Build",
|
||||||
|
"targetAbi": "10.9.0.0",
|
||||||
|
"sourceUrl": "https://gitea.tourolle.paris/dtourolle/jRay/releases/download/latest/jray_0.0.0.0.zip",
|
||||||
|
"checksum": "2f8beef54c03cec92a17431615cba604",
|
||||||
|
"timestamp": "2026-06-12T18:26:36Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "0.0.1",
|
||||||
|
"changelog": "Release 0.0.1",
|
||||||
|
"targetAbi": "10.9.0.0",
|
||||||
|
"sourceUrl": "https://gitea.tourolle.paris/dtourolle/jRay/releases/download/v0.0.1/jray_0.0.1.0.zip",
|
||||||
|
"checksum": "6c0e71d77ebac619920cf93a2c330b8f",
|
||||||
|
"timestamp": "2026-06-12T18:11:18Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "0.0.0.0",
|
||||||
|
"changelog": "Latest Build",
|
||||||
|
"targetAbi": "10.9.0.0",
|
||||||
|
"sourceUrl": "https://gitea.tourolle.paris/dtourolle/jRay/releases/download/latest/jray_0.0.0.0.zip",
|
||||||
|
"checksum": "6ed76e7fea217cda914a6610c48d7d30",
|
||||||
|
"timestamp": "2026-06-12T18:10:35Z"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"changelog": "Release 0.0.0",
|
"changelog": "Release 0.0.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user