This commit is contained in:
+1
-4
@@ -454,14 +454,11 @@ async def get_movie_date_options(dependencies: dict, imdb_id: str):
|
||||
if not movie:
|
||||
raise HTTPException(status_code=404, detail="Movie not found")
|
||||
|
||||
# Debug logging to understand the data issue
|
||||
# Debug logging (can be removed once Smart Fix is working)
|
||||
print(f"🔍 DEBUG: Movie data for {imdb_id}:")
|
||||
print(f" - released: {repr(movie.get('released'))}")
|
||||
print(f" - dateadded: {repr(movie.get('dateadded'))}")
|
||||
print(f" - source: {repr(movie.get('source'))}")
|
||||
print(f" - path: {repr(movie.get('path'))}")
|
||||
print(f" - has_video_file: {repr(movie.get('has_video_file'))}")
|
||||
print(f" - last_updated: {repr(movie.get('last_updated'))}")
|
||||
|
||||
options = []
|
||||
|
||||
|
||||
@@ -522,7 +522,9 @@ function refreshReport() {
|
||||
// Smart fix functions
|
||||
async function smartFixMovie(imdbId) {
|
||||
try {
|
||||
console.log('🔍 SMART FIX: Loading options for movie', imdbId);
|
||||
const options = await apiCall(`/api/movies/${imdbId}/date-options`);
|
||||
console.log('🔍 SMART FIX: Received options:', options);
|
||||
showSmartFixModal('movie', options);
|
||||
} catch (error) {
|
||||
console.error('Failed to load movie options:', error);
|
||||
@@ -541,10 +543,17 @@ async function smartFixEpisode(imdbId, season, episode) {
|
||||
}
|
||||
|
||||
function showSmartFixModal(mediaType, options) {
|
||||
console.log('🔍 SMART FIX: Showing modal for', mediaType, 'with options:', options);
|
||||
|
||||
const modal = document.getElementById('smart-fix-modal');
|
||||
const title = document.getElementById('smart-fix-title');
|
||||
const content = document.getElementById('smart-fix-content');
|
||||
|
||||
if (!modal || !title || !content) {
|
||||
console.error('❌ SMART FIX: Modal elements not found!', {modal, title, content});
|
||||
return;
|
||||
}
|
||||
|
||||
if (mediaType === 'movie') {
|
||||
title.textContent = `Fix Date for Movie: ${options.imdb_id}`;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user