mirror of
https://github.com/MrSleeps/jellyfin-scene-search.git
synced 2026-11-19 00:03:36 +00:00
Polish grouped scene details
This commit is contained in:
@@ -603,7 +603,8 @@
|
||||
const el = document.createElement('article');
|
||||
el.className = 'result';
|
||||
|
||||
const details = matches.map(scene => {
|
||||
const otherMatches = matches.slice(1);
|
||||
const details = otherMatches.map(scene => {
|
||||
const score = scene.ranking_score == null
|
||||
? (scene.siglip_score == null ? '—' : Number(scene.siglip_score).toFixed(3))
|
||||
: Number(scene.ranking_score).toFixed(3);
|
||||
@@ -613,7 +614,7 @@
|
||||
}).join('');
|
||||
|
||||
const moreText = totalMatches > shownMatches
|
||||
? ' · showing top ' + shownMatches
|
||||
? ' · ' + totalMatches + ' total hits, showing top ' + shownMatches
|
||||
: '';
|
||||
|
||||
el.innerHTML =
|
||||
@@ -628,8 +629,9 @@
|
||||
? (best.siglip_score == null ? '—' : Number(best.siglip_score).toFixed(3))
|
||||
: Number(best.ranking_score).toFixed(3)) +
|
||||
'</div>' +
|
||||
(matches.length > 1
|
||||
? '<details class="scene-details"><summary>View matching scenes' +
|
||||
(otherMatches.length
|
||||
? '<details class="scene-details"><summary>View ' + otherMatches.length +
|
||||
' other matching scene' + (otherMatches.length === 1 ? '' : 's') +
|
||||
moreText + '</summary>' + details + '</details>'
|
||||
: '') +
|
||||
'</div>';
|
||||
|
||||
Reference in New Issue
Block a user