Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bea4d931c6 | ||
|
|
49c7077e23 | ||
|
|
ff339b681b | ||
|
|
0e6b03be15 | ||
|
|
772babe9bc | ||
|
|
f8365a5b58 | ||
|
|
4b3b64bd7e | ||
|
|
abad55788d | ||
|
|
dea172d990 |
@@ -11,10 +11,10 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Jellyfin.Controller" Version="10.9.11" >
|
||||
<PackageReference Include="Jellyfin.Controller" Version="10.11.5" >
|
||||
<ExcludeAssets>runtime</ExcludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Jellyfin.Model" Version="10.9.11">
|
||||
<PackageReference Include="Jellyfin.Model" Version="10.11.5">
|
||||
<ExcludeAssets>runtime</ExcludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -37,5 +37,6 @@ public class TruthActor
|
||||
/// Gets the list of [start_sec, end_sec] windows during which the actor is on screen.
|
||||
/// </summary>
|
||||
[JsonPropertyName("scenes")]
|
||||
[JsonObjectCreationHandling(JsonObjectCreationHandling.Populate)]
|
||||
public Collection<double[]> Scenes { get; } = new();
|
||||
}
|
||||
|
||||
@@ -37,5 +37,6 @@ public class TruthFile
|
||||
/// Gets the list of actors detected in the film, each with their on-screen scene windows.
|
||||
/// </summary>
|
||||
[JsonPropertyName("actors")]
|
||||
[JsonObjectCreationHandling(JsonObjectCreationHandling.Populate)]
|
||||
public Collection<TruthActor> Actors { get; } = new();
|
||||
}
|
||||
|
||||
@@ -2,11 +2,49 @@
|
||||
'use strict';
|
||||
|
||||
var POLL_INTERVAL_MS = 1000;
|
||||
var OVERVIEW_MAX_LENGTH = 160;
|
||||
var overlayEl = null;
|
||||
var personCache = {};
|
||||
|
||||
function getItemIdFromHash() {
|
||||
var match = window.location.hash.match(/[?&]id=([0-9a-fA-F-]+)/);
|
||||
return match ? match[1] : null;
|
||||
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() {
|
||||
if (!window.ApiClient) {
|
||||
return Promise.reject(new Error('no ApiClient'));
|
||||
}
|
||||
|
||||
var url = window.ApiClient.getUrl('Sessions', { DeviceId: window.ApiClient.deviceId() });
|
||||
return window.ApiClient.ajax({ url: url, type: 'GET', dataType: 'json' }).then(function (sessions) {
|
||||
var session = sessions && sessions[0];
|
||||
if (!session || !session.NowPlayingItem || !session.PlayState) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
itemId: session.NowPlayingItem.Id,
|
||||
positionSeconds: (session.PlayState.PositionTicks || 0) / 10000000
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
function removeOverlay() {
|
||||
@@ -42,13 +80,66 @@
|
||||
|
||||
actors.forEach(function (actor) {
|
||||
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.padding = '6px 12px';
|
||||
card.style.borderRadius = '4px';
|
||||
card.style.fontSize = '14px';
|
||||
card.textContent = actor.name;
|
||||
card.style.padding = '8px 12px';
|
||||
card.style.borderRadius = '6px';
|
||||
card.style.display = 'flex';
|
||||
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);
|
||||
|
||||
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);
|
||||
@@ -72,14 +163,14 @@
|
||||
});
|
||||
}
|
||||
|
||||
function onPause(event) {
|
||||
var video = event.target;
|
||||
var itemId = getItemIdFromHash();
|
||||
if (!itemId) {
|
||||
return;
|
||||
}
|
||||
|
||||
fetchContext(itemId, video.currentTime);
|
||||
function onPause() {
|
||||
getNowPlaying().then(function (info) {
|
||||
if (info) {
|
||||
fetchContext(info.itemId, info.positionSeconds);
|
||||
}
|
||||
}, function () {
|
||||
// ApiClient unavailable or request error - fail silently, never break playback.
|
||||
});
|
||||
}
|
||||
|
||||
function onPlay() {
|
||||
|
||||
+34
-2
@@ -12,8 +12,40 @@
|
||||
"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": "d6f05de428a51573f020c06651245e69",
|
||||
"timestamp": "2026-06-12T16:53:59Z"
|
||||
"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",
|
||||
"changelog": "Release 0.0.0",
|
||||
"targetAbi": "10.9.0.0",
|
||||
"sourceUrl": "https://gitea.tourolle.paris/dtourolle/jRay/releases/download/v0.0.0/jray_0.0.0.0.zip",
|
||||
"checksum": "fd92458f741b8f7aa0b77da04cbc6a43",
|
||||
"timestamp": "2026-06-12T17:05:10Z"
|
||||
},
|
||||
{
|
||||
"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": "3650af90fd163042af65cc702d618506",
|
||||
"timestamp": "2026-06-12T17:04:26Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user