34 Commits

Author SHA1 Message Date
sbcrumb 97a9f3431a refactor: update and remove anything to do with NFO files
Local Docker Build (Dev) / build-dev (push) Successful in 35s
moving to an all DB approach since radarr overwrites .nfo files
2025-11-02 13:43:28 -05:00
sbcrumb 6d2435a037 update scan
Local Docker Build (Dev) / build-dev (push) Successful in 7s
2025-10-28 17:21:29 -04:00
sbcrumb b1598114d9 update: scan to check .nfo files first
Local Docker Build (Dev) / build-dev (push) Successful in 7s
2025-10-28 17:16:15 -04:00
sbcrumb b709a377c8 update: to handle specials
Local Docker Build (Dev) / build-dev (push) Successful in 7s
2025-10-28 17:00:56 -04:00
sbcrumb babe5ac0df udpates to detect specials
Local Docker Build (Dev) / build-dev (push) Successful in 6s
2025-10-28 16:51:21 -04:00
sbcrumb 952319b061 fixes: dates sonarr
Local Docker Build (Dev) / build-dev (push) Successful in 5s
2025-10-25 13:07:57 -04:00
sbcrumb 47311864cf disable: remove season.nfo and tvshow.nfo from being created
Local Docker Build (Dev) / build-dev (push) Successful in 5s
2025-10-25 12:22:12 -04:00
sbcrumb f67663a338 jave: updates 2025-10-22 21:27:03 -04:00
sbcrumb 3c4e47b08e fixes: web interface shutdown
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-20 08:30:55 -04:00
sbcrumb eb9bfbf82e db:sonarr
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-19 12:47:03 -04:00
sbcrumb 3c4cac6177 db: fixes
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-19 10:28:32 -04:00
sbcrumb d1d1e1a3d1 update: to sonarr process
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-19 10:14:53 -04:00
sbcrumb 55d5f891b5 improv: phase 1 of faster scan and tracking of scans
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-18 15:16:02 -04:00
sbcrumb e06df9c8b0 db: more
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-18 09:37:53 -04:00
sbcrumb 762031d3f3 db: update
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-18 09:07:45 -04:00
sbcrumb 6d5635f56a sonarr: fuzzy date match debug
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-16 10:04:06 -04:00
sbcrumb fd2f8f2c51 fix: fuzzy match
Local Docker Build (Dev) / build-dev (push) Successful in 3s
2025-10-16 10:00:37 -04:00
sbcrumb 47eb74da06 debug: debug airdates in TV
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-16 09:50:04 -04:00
sbcrumb 8a3e01d966 fix: shows not seeing airdates
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-16 09:17:03 -04:00
sbcrumb c5177ba920 sonarr: fix airdates not being used.
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-16 08:51:54 -04:00
sbcrumb d17f924192 fix: nfo cache
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-15 21:13:51 -04:00
sbcrumb 857d423ae4 fix: airdates again
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-15 20:58:26 -04:00
sbcrumb 79a311f8ec web: fix for unresponsive web interface
Local Docker Build (Dev) / build-dev (push) Successful in 4s
2025-10-15 10:13:25 -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 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 14d551fc36 update 2
Local Docker Build (Dev) / build-dev (pull_request) Successful in 3s
2025-10-11 09:49:14 -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 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 ed78a81a8e Fix TV webhook processing: Add missing process_webhook_episodes method
- Add process_webhook_episodes method to TVProcessor class for targeted episode processing
- Implement helper methods: _parse_episode_from_filename, _get_sonarr_series_metadata, _get_episode_metadata, _extract_title_from_filename, _get_webhook_episode_date
- Enables webhook-based episode processing with title extraction and metadata handling
- Resolves 'TVProcessor' object has no attribute 'process_webhook_episodes' error
- Version bump to 2.0.10
2025-10-09 18:04:19 -04:00
sbcrumb 5ade28c118 fix: Only fallback to airdate when Sonarr has no import date
Local Docker Build (Dev) / build-dev (pull_request) Successful in 23s
- Modified fallback logic to only use airdate as dateadded when source is NOT 'sonarr:history.import'
- This prevents using airdate fallback when Sonarr has valid import dates available
- Ensures Sonarr import dates are prioritized over airdate fallbacks
- Addresses issue where episodes with valid Sonarr import dates were still falling back to airdates
2025-10-05 10:42:35 -04:00
sbcrumb 191e6f5f3f fix: Use Sonarr import history for TV episode date detection
- Modified _get_sonarr_episodes to call get_episode_import_history() for each episode
- This retrieves actual import dates from Sonarr's history API instead of just episodeFile.dateAdded
- Added fallback to episodeFile.dateAdded if history lookup fails
- Updated source tracking to use 'sonarr:history.import' for better debugging
- Added debug logging to show which method found the import date
- Should resolve issue where episodes fall back to aired dates despite valid Sonarr imports
2025-10-05 10:29:13 -04:00
sbcrumb 0980ba0761 Fix TV processing issues: correct method names and add missing episode air date method
Local Docker Build (Dev) / build-dev (pull_request) Successful in 24s
- Fix SonarrClient method call from get_series_by_imdb to series_by_imdb
- Fix SonarrClient method call from get_episodes to episodes_for_series
- Add missing get_episode_air_date method to ExternalClientManager
- Method uses TMDB and OMDb APIs to fetch episode air dates
- Version bump to 2.0.7
2025-10-04 11:41:35 -04:00
sbcrumb 82eb29fd63 feat: implement comprehensive async I/O capabilities
Local Docker Build (Dev) / build-dev (pull_request) Successful in 20s
- Add utils/async_file_utils.py with aiofiles-based operations
- Create core/async_nfo_manager.py for concurrent NFO processing
- Add async methods to TVProcessor for concurrent episode handling
- Implement async_find_episodes_on_disk() for faster scanning
- Add async_batch_create_episode_nfos() for concurrent NFO creation
- Support async_process_multiple_series() for parallel processing
- Optimize I/O performance for large media libraries
- Enable controlled concurrency with semaphores and rate limiting

Performance improvements:
- Concurrent file operations reduce I/O wait times
- Batch processing minimizes individual file access overhead
- Configurable concurrency limits prevent system overload
- Async directory scanning for faster episode discovery
2025-09-27 13:17:54 -04:00
sbcrumb fa1e4e2ec7 improvements (#15)
Build & Push DEV to DockerHub / docker (push) Failing after 1m12s
Reviewed-on: #15
2025-09-27 13:00:08 -04:00