WEB: INTERFACE AND AUTH FAILS TO DELETE
Local Docker Build (Dev) / build-dev (push) Successful in 5s
Local Docker Build (Dev) / build-dev (push) Successful in 5s
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-fix2"></script>
|
<script src="/static/js/app.js?v=2.8.2-20241025-fix3"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -92,6 +92,7 @@ function initializeEventListeners() {
|
|||||||
async function apiCall(endpoint, options = {}) {
|
async function apiCall(endpoint, options = {}) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(endpoint, {
|
const response = await fetch(endpoint, {
|
||||||
|
credentials: 'include', // Include cookies for authentication
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
...options.headers
|
...options.headers
|
||||||
@@ -912,7 +913,7 @@ function showEnhancedEditModal(mediaType, options, currentDateadded, currentSour
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
// Add available date options
|
// Add available date options
|
||||||
options.options.forEach((option, index) => {
|
(options.date_options || options.options || []).forEach((option, index) => {
|
||||||
const isSelected = option.source === currentSource ? 'checked' : '';
|
const isSelected = option.source === currentSource ? 'checked' : '';
|
||||||
const optionId = `date-option-${index}`;
|
const optionId = `date-option-${index}`;
|
||||||
|
|
||||||
@@ -1086,7 +1087,14 @@ async function editEpisode(imdbId, season, episode, dateadded, source) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Load episode options to populate available dates
|
// Load episode options to populate available dates
|
||||||
const options = await apiCall(`/api/episodes/${imdbId}/${season}/${episode}/date-options`);
|
const dateOptions = await apiCall(`/api/episodes/${imdbId}/${season}/${episode}/date-options`);
|
||||||
|
// Create options object with episode metadata
|
||||||
|
const options = {
|
||||||
|
imdb_id: imdbId,
|
||||||
|
season: season,
|
||||||
|
episode: episode,
|
||||||
|
date_options: dateOptions.options || []
|
||||||
|
};
|
||||||
showEnhancedEditModal('episode', options, dateadded, source);
|
showEnhancedEditModal('episode', options, dateadded, source);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed to load episode options for edit:', error);
|
console.error('Failed to load episode options for edit:', error);
|
||||||
|
|||||||
Reference in New Issue
Block a user