+ ${group.map((scene, sIdx) => {
+ const isBest = sIdx === 0;
+ const file = (scene.files && scene.files[0]) || {};
+ const resLabel = file.height ? `${file.height}p` : 'Unknown';
+ const bitrateFormatted = file.bit_rate ? `${(file.bit_rate / 1000000).toFixed(2)} Mbps` : '-';
+ const sizeFormatted = file.size ? (file.size >= 1024**3 ? `${(file.size / 1024**3).toFixed(2)} GB` : `${(file.size / 1024**2).toFixed(1)} MB`) : '-';
+ const durFormatted = file.duration ? `${Math.floor(file.duration / 60)}m ${Math.floor(file.duration % 60)}s` : '-';
+ const performerNames = (scene.performers || []).map(p => p.name).join(', ') || 'Unknown';
+
+ return `
+
+
+
+
+ ${isBest ? '๐ Recommended Keeper' : 'โ ๏ธ Lower Quality Duplicate'}
+
+ ID: ${scene.id}
+
+
+
+
+ ${scene.paths?.screenshot ? `

` : ''}
+
${durFormatted}
+
+
+
+
+ ${escapeHtml(scene.title || 'Untitled Scene')}
+
+
+
+ ๐ค ${escapeHtml(performerNames)}
+ ๐ข ${escapeHtml(scene.studio?.name || '')}
+
+
+
+
+ ${resLabel}
+ ${bitrateFormatted}
+ ${sizeFormatted}
+ ${file.video_codec || 'video'}
+
+
+
+
+ ๐ ${escapeHtml(file.path || '')}
+
+
+
+
+
+ ${!isBest ? `
+
+ ` : `
+
+ `}
+
+
+