Commit Graph

576 Commits

Author SHA1 Message Date
sbcrumb 909df0cc83 web: update web interface for tv eps missing date
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-15 09:55:28 -04:00
sbcrumb 913aed1f60 fix: data issue not populating
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-15 08:21:27 -04:00
sbcrumb 0dfc296bf4 fix: db not filling in .nfo data
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-15 07:56:56 -04:00
sbcrumb 66ba17991e fix:updates for interface
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-14 16:38:30 -04:00
sbcrumb f903606d3a fix: fix webinterface broken when manual scan
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-14 16:29:27 -04:00
sbcrumb 051f9d7173 fix: broken interface
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-14 16:16:05 -04:00
sbcrumb 536fc70350 feature: auto populate date
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-14 16:11:55 -04:00
sbcrumb bb9c12a0be fix: date
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-14 16:04:19 -04:00
sbcrumb 0bf72c1e5c feat:fix
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-14 15:59:52 -04:00
sbcrumb 00f2b77bfb fix: smart fix date issues
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-14 15:53:11 -04:00
sbcrumb 212e51e54f fix: smart dates
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-14 15:50:09 -04:00
sbcrumb 6fae41aef5 fix: digital realease date
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-14 15:46:07 -04:00
sbcrumb 249b55964e Merge web-interface branch with enhanced UI features and improved date parsing
- Added Smart Fix modal with multiple date source options
- Enhanced edit modal with automatic date option population
- Improved date parsing with timezone handling and validation
- Added debug functionality for database inspection
- Fixed search issues and enhanced web interface controls

🤖 Generated with [Claude Code](https://claude.ai/code)
2025-10-14 15:32:37 -04:00
sbcrumb 7b7ac6f179 fix: web interface improvments
Local Docker Build (Dev) / build-dev (pull_request) Successful in 4s
2025-10-14 15:27:40 -04:00
sbcrumb 8de6a58209 Merge pull request 'fix: search issues in webinterfacey' (#51) from web-interface into dev
Local Docker Build (Dev) / build-dev (push) Successful in 4s
Reviewed-on: #51
2025-10-14 15:18:55 -04:00
sbcrumb dcace84406 fix: search issues in webinterfacey 2025-10-14 15:18:55 -04:00
sbcrumb 8da23013ff fix: search issues in webinterfacey
Local Docker Build (Dev) / build-dev (pull_request) Successful in 4s
2025-10-14 15:18:08 -04:00
sbcrumb b34691b22a Merge pull request 'feat: add webinterface' (#50) from web-interface into dev
Local Docker Build (Dev) / build-dev (push) Successful in 4s
Reviewed-on: #50
2025-10-14 14:58:15 -04:00
sbcrumb cebed7a6bb feat: add webinterface
Local Docker Build (Dev) / build-dev (pull_request) Successful in 4s
2025-10-14 14:57:17 -04:00
sbcrumb 867bd008c5 fix: Improve Docker container shutdown handling
Local Docker Build (Dev) / build-dev (push) Successful in 3s
- Add proper signal handlers for graceful shutdown of all components
- Implement WebhookBatcher.shutdown() to properly close ThreadPoolExecutor and cancel timers
- Add NFOGuardDatabase.close() method to close thread-local database connections
- Increase uvicorn graceful shutdown timeout to 15 seconds
- Add cleanup in finally block to ensure resources are freed even if signal handler fails
- Reduce logging and server header overhead for better performance

This should resolve Docker container shutdown issues where containers don't respond to SIGTERM properly.

Bump version to 2.1.1

🤖 Generated with [Claude Code](https://claude.ai/code)
2025-10-12 13:02:07 -04:00
sbcrumb c8fde41dfb fix: Ensure NFOGuard metadata appears at bottom of movie NFO files
Local Docker Build (Dev) / build-dev (push) Successful in 4s
- Improve element removal logic to only remove clearly NFOGuard-managed elements
- Use batch element addition to ensure NFOGuard metadata appears as contiguous block at bottom
- Better preserve existing non-NFOGuard metadata fields
- Fix issue where lockdata/dateadded appeared scattered throughout NFO instead of grouped at bottom

🤖 Generated with [Claude Code](https://claude.ai/code)
2025-10-12 12:56:10 -04:00
sbcrumb a559873999 release: Clean up debug logging and bump to v2.1.0
Local Docker Build (Dev) / build-dev (push) Successful in 4s
FEATURES ADDED:
- Comprehensive TV IMDb detection (folder/filename/NFO)
- TV show batch validation prevents wrong series processing
- Fixed glob pattern for exact IMDb matching
- Enhanced webhook path mapping reliability

CLEANUP:
- Removed temporary debug print statements
- Clean production-ready logging
- Maintains all core improvements from debugging session

FIXES:
- Resolves Girls (2012) vs Golden Girls matching issue
- Proper bracket escaping in glob patterns
- Comprehensive IMDb detection for both movies and TV shows
2025-10-12 11:15:20 -04:00
sbcrumb baa6474d12 debug: Force path mapper debug logging to diagnose webhook path mapping failure
Local Docker Build (Dev) / build-dev (push) Successful in 4s
- Enable path_debug temporarily during webhook path mapping
- Version 2.0.28 to track path mapping diagnostics
- Should show Sonarr root folder matching and TV path mapping logic
2025-10-12 11:06:02 -04:00
sbcrumb 1a98c406a2 Merge pull request 'sonarr-matching' (#49) from sonarr-matching into dev
Local Docker Build (Dev) / build-dev (push) Successful in 4s
Reviewed-on: #49
2025-10-12 11:03:40 -04:00
sbcrumb 97aa2042a3 Merge branch 'dev' into sonarr-matching
Local Docker Build (Dev) / build-dev (pull_request) Successful in 3s
2025-10-12 11:03:33 -04:00
sbcrumb 53d7753231 sonarr-matching (#48)
Local Docker Build (Dev) / build-dev (push) Successful in 4s
Reviewed-on: #48
2025-10-12 11:02:36 -04:00
sbcrumb 7216491d76 debug: Add comprehensive webhook path mapping debug logging
Local Docker Build (Dev) / build-dev (pull_request) Successful in 4s
- Track webhook path provided from Sonarr webhooks
- Show path mapper availability and mapping results
- Trace why webhook paths fail and fallback to search occurs
- Version 2.0.27 for webhook path debugging
2025-10-12 11:01:59 -04:00
sbcrumb a5b2381023 resolve: Fix version conflict - use 2.0.26 from dev branch
Local Docker Build (Dev) / build-dev (pull_request) Successful in 4s
2025-10-12 10:59:50 -04:00
sbcrumb 80df0a0278 chore: Bump version to 2.0.26 for enhanced debug logging
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-12 10:57:33 -04:00
sbcrumb e780b9e125 debug: Add comprehensive logging to path search and title fallback
- Show all search paths being checked and their existence status
- Debug title fallback logic showing cleaned title comparisons
- Track exactly where false matches occur (e.g., 'girls' in 'thegoldengirls')
- Identify why only some search paths are processed
2025-10-12 10:57:20 -04:00
sbcrumb 59f562c2fa Merge pull request 'sonarr-matching' (#46) from sonarr-matching into dev
Local Docker Build (Dev) / build-dev (push) Successful in 4s
Reviewed-on: #46
2025-10-12 10:53:50 -04:00
sbcrumb 716dcc05e8 chore: Bump version to 2.0.25 for sonarr-matching fixes
- Increment version for comprehensive TV IMDb detection fixes
- Includes glob pattern fix and batch validation improvements
- Ready for deployment and testing
2025-10-12 10:53:50 -04:00
sbcrumb 000d57e9fe debug: Add logging to find_media_path_by_imdb_and_title to trace search behavior
- Add debug prints to see glob patterns being used
- Track number of matches found and which paths are returned
- Help diagnose why wrong TV series paths are still being found
2025-10-12 10:53:50 -04:00
sbcrumb a0f676a368 chore: Bump version to 2.0.25 for sonarr-matching fixes
Local Docker Build (Dev) / build-dev (pull_request) Successful in 4s
- Increment version for comprehensive TV IMDb detection fixes
- Includes glob pattern fix and batch validation improvements
- Ready for deployment and testing
2025-10-12 10:52:48 -04:00
sbcrumb 60bbf9440a debug: Add logging to find_media_path_by_imdb_and_title to trace search behavior
- Add debug prints to see glob patterns being used
- Track number of matches found and which paths are returned
- Help diagnose why wrong TV series paths are still being found
2025-10-12 10:51:52 -04:00
sbcrumb a3f7fbe68e Merge pull request 'fix: Correct IMDb ID pattern matching in TV show webhook processing' (#45) from sonarr-matching into dev
Local Docker Build (Dev) / build-dev (push) Successful in 4s
Reviewed-on: #45
2025-10-12 10:47:02 -04:00
sbcrumb 348f83d547 feat: Add comprehensive IMDb detection for TV shows
Local Docker Build (Dev) / build-dev (pull_request) Successful in 4s
- Add find_series_imdb_id method to check directory, filenames, and tvshow.nfo
- Add TV show batch validation in webhook batcher (like movies)
- Ensures TV webhooks process correct series by validating IMDb match
- Prevents mismatched processing like Girls (2012) -> Gachiakuta (2025)
- Comprehensive detection checks: folder name, file names, NFO content
2025-10-12 10:46:43 -04:00
sbcrumb 41bccb82b1 fix: Correct IMDb ID pattern matching in TV show webhook processing
- Fix glob pattern to escape brackets for literal [imdb-ID] matching
- Resolves issue where webhook for Girls (2012) [tt1723816] was incorrectly matching Gachiakuta (2025) [tt32612521]
- Previous pattern treated brackets as character sets instead of literal strings
2025-10-12 10:42:26 -04:00
sbcrumb 0827d30a76 Fix NFO extraction to handle lockdata+aired but no dateadded
Local Docker Build (Dev) / build-dev (push) Successful in 3s
The root issue was that NFO extraction methods required both dateadded
AND lockdata=true to return any data. But "The Chosen" NFOs have
lockdata=true and aired dates but no dateadded field, so extraction
returned None and TIER 2 fallback logic never triggered.

Changes:
- Modified extract_nfoguard_dates_from_nfo() to accept lockdata=true NFOs
- Added support for extracting aired dates from episode NFOs
- Updated logic to return data when lockdata=true regardless of dateadded
- Now TIER 2 will properly apply aired->dateadded fallback logic
- Updated version to 2.0.24

This ensures episodes with incomplete NFO metadata get proper fallback
processing instead of being ignored by the three-tier system.

🤖 Generated with [Claude Code](https://claude.ai/code)
2025-10-11 14:38:37 -04:00
sbcrumb 5b9f5c44e1 Fix TV processor TIER 2 fallback logic for NFO files with aired but no dateadded
Local Docker Build (Dev) / build-dev (push) Successful in 4s
The issue was that TIER 2 (NFO cache) wasn't applying the aired date fallback
when NFO files contained aired dates but no dateadded values. This caused
episodes like "The Chosen" to show "no date added just air" because the
system would find lockdata in TIER 2 but reject it due to missing dateadded,
without applying the fallback logic.

Changes:
- Enhanced TIER 2 NFO processing to apply aired->dateadded fallback
- Added debug logging for NFO fallback cases
- Updated version to 2.0.23

🤖 Generated with [Claude Code](https://claude.ai/code)
2025-10-11 13:12:36 -04:00
sbcrumb 21bfb97f4b Merge pull request 'update 2' (#44) from missin-sonarr into dev
Local Docker Build (Dev) / build-dev (push) Successful in 3s
Reviewed-on: #44
2025-10-11 09:49:53 -04:00
sbcrumb 14d551fc36 update 2
Local Docker Build (Dev) / build-dev (pull_request) Successful in 3s
2025-10-11 09:49:14 -04:00
sbcrumb be075f884e Merge pull request 'Implement optimal caching hierarchy for both movies and TV shows' (#43) from sonarrissues into dev
Local Docker Build (Dev) / build-dev (push) Successful in 4s
Reviewed-on: #43
2025-10-10 16:18:34 -04:00
sbcrumb fb3040c554 Implement optimal caching hierarchy for both movies and TV shows
Perfect the caching strategy as requested:
1. Database check first (fastest lookup)
2. NFO file extraction with database caching
3. API calls only when absolutely necessary

Movies: Fixed order from NFO->DB->API to DB->NFO->API
TV Shows: Added missing NFO extraction tier between database and API

Benefits:
- First scan: Extract existing NFOGuard data from NFOs and cache in DB
- Subsequent scans: ~99% database cache hits, minimal API calls
- NFO recovery: Rebuild database from existing NFO files
- Webhook processing: Cache webhook dates in database immediately

Expected performance: Manual scans now use 3-tier optimization
2025-10-10 16:18:34 -04:00
sbcrumb e609c32df0 Merge pull request 'sonarrissues' (#42) from sonarrissues into dev
Local Docker Build (Dev) / build-dev (push) Successful in 4s
Reviewed-on: #42
2025-10-10 15:31:28 -04:00
sbcrumb 88b75230a7 Bump version to 2.0.21 to resolve merge conflict with dev branch
Local Docker Build (Dev) / build-dev (pull_request) Successful in 4s
2025-10-10 15:30:06 -04:00
sbcrumb 035f2f6e02 Optimize TV processor performance with database-first episode lookup
Major performance improvement for manual scans:
- Check NFOGuard database before making Sonarr API calls
- Only query Sonarr history for episodes missing from database
- Filter Sonarr episode processing to only needed episodes
- Add detailed logging for cache hits vs API calls

Expected improvement: 172 API calls -> 0-10 API calls for typical scans
2025-10-10 15:30:06 -04:00
sbcrumb 76dcc0be33 Merge pull request 'Fix rename webhook targeting using episodeId lookup' (#39) from sonarrissues into dev
Local Docker Build (Dev) / build-dev (push) Successful in 4s
Reviewed-on: #39
2025-10-10 14:17:05 -04:00
sbcrumb d6c1b73959 Fix rename webhook targeting using episodeId lookup
Found that rename events contain episodeId field which can be used to fetch specific episode details. Replaced complex episode data extraction with direct API call to /api/v3/episode/{episodeId} to get season/episode numbers for targeted processing.

This should resolve rename webhooks processing entire series instead of single episodes.
2025-10-10 14:17:05 -04:00
sbcrumb ace671ab08 Merge pull request 'Add comprehensive rename event debugging' (#38) from sonarrissues into dev
Local Docker Build (Dev) / build-dev (push) Successful in 4s
Reviewed-on: #38
2025-10-10 14:11:53 -04:00