This commit is contained in:
@@ -457,6 +457,6 @@
|
|||||||
<!-- Toast Notifications -->
|
<!-- Toast Notifications -->
|
||||||
<div class="toast-container" id="toast-container"></div>
|
<div class="toast-container" id="toast-container"></div>
|
||||||
|
|
||||||
<script src="/static/js/app.js?v=2.8.2-20241025-syntax-fix"></script>
|
<script src="/static/js/app.js?v=2.8.2-20241025-counts-fix"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -539,7 +539,7 @@ function showEpisodesModal(data) {
|
|||||||
`<td>${dateadded}</td>`;
|
`<td>${dateadded}</td>`;
|
||||||
|
|
||||||
return `
|
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>S${episode.season.toString().padStart(2, '0')}E${episode.episode.toString().padStart(2, '0')}</td>
|
||||||
<td>${episode.aired || '-'}</td>
|
<td>${episode.aired || '-'}</td>
|
||||||
${dateCell}
|
${dateCell}
|
||||||
@@ -1349,20 +1349,19 @@ function updateEpisodeModalCounts() {
|
|||||||
const episodesWithDates = Array.from(remainingRows).filter(row =>
|
const episodesWithDates = Array.from(remainingRows).filter(row =>
|
||||||
row.getAttribute('data-has-date') === 'true'
|
row.getAttribute('data-has-date') === 'true'
|
||||||
).length;
|
).length;
|
||||||
|
const episodesWithVideo = Array.from(remainingRows).filter(row =>
|
||||||
|
row.getAttribute('data-has-video') === 'true'
|
||||||
|
).length;
|
||||||
const episodesWithoutDates = totalEpisodes - episodesWithDates;
|
const episodesWithoutDates = totalEpisodes - episodesWithDates;
|
||||||
|
|
||||||
// Update the stats in the modal
|
// Update the stats in the modal
|
||||||
const statsDiv = document.querySelector('.episode-stats');
|
const statsDiv = document.querySelector('.episode-stats');
|
||||||
if (statsDiv) {
|
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 = `
|
statsDiv.innerHTML = `
|
||||||
<div><strong>Total Episodes:</strong> ${totalEpisodes}</div>
|
<div><strong>Total Episodes:</strong> ${totalEpisodes}</div>
|
||||||
<div><strong>With Dates:</strong> ${episodesWithDates}</div>
|
<div><strong>With Dates:</strong> ${episodesWithDates}</div>
|
||||||
<div style="color: #dc3545;"><strong>Missing Dates:</strong> ${episodesWithoutDates}</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