From bfdf02ebd1d51babff60f4d155c0eca078bd5b7b Mon Sep 17 00:00:00 2001 From: SBCrumb Date: Wed, 24 Sep 2025 13:49:54 -0400 Subject: [PATCH] fix: Improve TMDB fallback detection and logging for movies without IMDb IDs - Update find_movie_imdb_id to properly log TMDB vs IMDb ID detection - Fix error message to indicate search for both IMDb AND TMDB IDs - Add critical workflow reminder to SUMMARY.md for code-only development - Should resolve For the One (2024) processing with TMDB ID 1339758 --- .local/SUMMARY.md | 10 ++++++++++ core/nfo_manager.py | 9 ++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.local/SUMMARY.md b/.local/SUMMARY.md index 89640a0..7be09be 100644 --- a/.local/SUMMARY.md +++ b/.local/SUMMARY.md @@ -109,6 +109,16 @@ Implemented intelligent caching system that eliminates 90%+ of processing time o - **SECURITY RECORD**: Document sensitive changes that can't be mentioned publicly - **DEVELOPMENT CONTINUITY**: Help future sessions understand what really happened +### 🚨 CRITICAL DEVELOPMENT WORKFLOW REMINDER + +**⚠️ CODE REPOSITORY ONLY - NO SYSTEM ACCESS:** +- **THIS IS A CODE REPOSITORY ONLY** - No access to running NFOGuard systems, movie directories, or file operations +- **MAKE CODE CHANGES ONLY** - Edit source files, commit to Gitea, push for local builds +- **NO BASH COMMANDS** - Cannot run python scripts, find commands, or test operations outside of git +- **GITEA LOCAL BUILDS** - All testing happens on local Gitea builds, not in development environment +- **NO FILE SYSTEM ACCESS** - Cannot access /mnt/unionfs/Media/Movies/ or any movie directories +- **CODE CHANGES → COMMIT → PUSH → BUILD** - This is the only workflow available + ### 🚫 CRITICAL COMMIT MESSAGE GUIDELINES **NEVER INCLUDE IN COMMITS:** diff --git a/core/nfo_manager.py b/core/nfo_manager.py index b31c768..1ad3761 100644 --- a/core/nfo_manager.py +++ b/core/nfo_manager.py @@ -114,14 +114,17 @@ class NFOManager: print(f"✅ Found IMDb ID in filename: {imdb_id} from {file_path.name}") return imdb_id - # Finally, try NFO file content + # Finally, try NFO file content (including TMDB fallback) nfo_path = movie_dir / "movie.nfo" imdb_id = self.parse_imdb_from_nfo(nfo_path) if imdb_id: - print(f"✅ Found IMDb ID in NFO file: {imdb_id} from {nfo_path}") + if imdb_id.startswith("tmdb-"): + print(f"✅ Found TMDB ID in NFO file: {imdb_id} from {nfo_path} (fallback mode)") + else: + print(f"✅ Found IMDb ID in NFO file: {imdb_id} from {nfo_path}") return imdb_id - print(f"❌ No IMDb ID found in directory, filenames, or NFO for: {movie_dir.name}") + print(f"❌ No IMDb or TMDB ID found in directory, filenames, or NFO for: {movie_dir.name}") return None def extract_nfoguard_dates_from_nfo(self, nfo_path: Path) -> Optional[Dict[str, str]]: