This commit is contained in:
@@ -539,7 +539,7 @@ function showEpisodesModal(data) {
|
||||
`<td>${dateadded}</td>`;
|
||||
|
||||
return `
|
||||
<tr class="${rowClass}" data-has-date="${!missingDate}">
|
||||
<tr class="${rowClass}" data-has-date="${!missingDate}" data-has-video="${episode.has_video_file}">
|
||||
<td>S${episode.season.toString().padStart(2, '0')}E${episode.episode.toString().padStart(2, '0')}</td>
|
||||
<td>${episode.aired || '-'}</td>
|
||||
${dateCell}
|
||||
@@ -1349,20 +1349,19 @@ function updateEpisodeModalCounts() {
|
||||
const episodesWithDates = Array.from(remainingRows).filter(row =>
|
||||
row.getAttribute('data-has-date') === 'true'
|
||||
).length;
|
||||
const episodesWithVideo = Array.from(remainingRows).filter(row =>
|
||||
row.getAttribute('data-has-video') === 'true'
|
||||
).length;
|
||||
const episodesWithoutDates = totalEpisodes - episodesWithDates;
|
||||
|
||||
// Update the stats in the modal
|
||||
const statsDiv = document.querySelector('.episode-stats');
|
||||
if (statsDiv) {
|
||||
// Keep the existing "With Video" count by finding it
|
||||
const videoCountDiv = statsDiv.querySelector('div:nth-child(4)');
|
||||
const videoCountText = videoCountDiv ? videoCountDiv.innerHTML : '<div><strong>With Video:</strong> -</div>';
|
||||
|
||||
statsDiv.innerHTML = `
|
||||
<div><strong>Total Episodes:</strong> ${totalEpisodes}</div>
|
||||
<div><strong>With Dates:</strong> ${episodesWithDates}</div>
|
||||
<div style="color: #dc3545;"><strong>Missing Dates:</strong> ${episodesWithoutDates}</div>
|
||||
${videoCountText}
|
||||
<div><strong>With Video:</strong> ${episodesWithVideo}</div>
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user