Commit Graph

579 Commits

Author SHA1 Message Date
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
sbcrumb e03249bb36 Add comprehensive rename event debugging
Local Docker Build (Dev) / build-dev (pull_request) Successful in 4s
Enhanced debugging for Sonarr rename events to understand the actual structure of episodeFileRenamed history records. Added checks for episode data in multiple possible locations (episode, episodeFile, data objects) to identify why season/episode information is missing.

🤖 Generated with [Claude Code](https://claude.ai/code)
2025-10-10 14:11:07 -04:00
sbcrumb f78e8cf924 Merge pull request 'fix: Improve Sonarr history API query for rename events' (#37) from sonarr-api into dev
Local Docker Build (Dev) / build-dev (push) Successful in 4s
Reviewed-on: #37
2025-10-10 14:03:40 -04:00
sbcrumb a5eb23e886 fix: Improve Sonarr history API query for rename events
- Remove invalid eventType parameter that was causing 400 error
- Fetch recent history and filter client-side for episodeFileRenamed events
- Add better datetime parsing for event filtering
- Increase page size to 50 to catch more recent events
2025-10-10 14:03:40 -04:00
sbcrumb fe59875719 Merge pull request 'fix: Use environment variable directly for Sonarr API key' (#36) from sonarr-api into dev
Local Docker Build (Dev) / build-dev (push) Successful in 4s
Reviewed-on: #36
2025-10-10 11:17:29 -04:00
sbcrumb 4dff85c5c9 fix: Use environment variable directly for Sonarr API key
Local Docker Build (Dev) / build-dev (pull_request) Successful in 4s
- Changed from config.sonarr_api_key to os.environ.get('SONARR_API_KEY', '')
- Matches pattern used in tv_processor.py for Sonarr API access
2025-10-10 11:17:02 -04:00
sbcrumb d12a634dd1 Merge pull request 'fix: Correct config attribute name for Sonarr URL in rename webhook handler' (#35) from rename-sonarr into dev
Local Docker Build (Dev) / build-dev (push) Successful in 4s
Reviewed-on: #35
2025-10-10 11:07:49 -04:00
sbcrumb 0e24f74dcb fix: Correct config attribute name for Sonarr URL in rename webhook handler
Local Docker Build (Dev) / build-dev (pull_request) Successful in 4s
- Changed config.sonarr_base_url to config.sonarr_url to match actual config object
- Fixes AttributeError that was preventing rename webhook targeting from working
2025-10-10 11:02:53 -04:00
sbcrumb 6e70497be2 Merge pull request 'fix: Add targeted mode for rename webhooks using Sonarr history API' (#34) from rename into dev
Local Docker Build (Dev) / build-dev (push) Successful in 4s
Reviewed-on: #34
2025-10-10 10:40:16 -04:00
sbcrumb 3d0dae995a fix: Add targeted mode for rename webhooks using Sonarr history API
- Rename webhooks don't include episodeFile data from Sonarr
- Added fallback to query recent episodeFileRenamed events from history
- Uses 1-hour window to find most recent rename for targeted processing
- Prevents full series processing on single episode renames
2025-10-10 10:40:16 -04:00
sbcrumb 74c30d647e Merge pull request 'rename' (#33) from rename into dev
Local Docker Build (Dev) / build-dev (push) Successful in 3s
Reviewed-on: #33
2025-10-10 10:31:12 -04:00
sbcrumb 5cc7281f06 bump: Version 2.0.13 for rename webhook debug logging
Local Docker Build (Dev) / build-dev (pull_request) Successful in 3s
2025-10-10 10:30:31 -04:00
sbcrumb 6e15d79b8f debug: Add comprehensive logging for rename webhook episodeFile analysis 2025-10-10 10:29:15 -04:00
sbcrumb f98fa9626c Merge pull request 'sonarr-all' (#32) from sonarr-all into dev
Local Docker Build (Dev) / build-dev (push) Successful in 3s
Reviewed-on: #32
2025-10-09 18:13:06 -04:00
sbcrumb 3787ca2d23 Fix all Sonarr webhooks: Force targeted processing for single episodes
Local Docker Build (Dev) / build-dev (pull_request) Successful in 3s
- Extend episodeFile extraction to ALL webhook types (Download, Rename, Upgrade)
- Force targeted mode when episodes_data has ≤3 episodes to prevent full series processing
- Add debug logging to track episode extraction and processing mode decisions
- Prevents processing 177 episodes when only 1-3 episodes are involved
- Applies to imports, renames, and upgrades - not just renames
- Version bump to 2.0.12

This ensures that single episode operations (most common) only process the specific
episode(s) involved instead of scanning the entire series.
2025-10-09 18:11:47 -04:00
sbcrumb e897656396 Fix TV rename webhooks: Implement targeted episode processing
- Extract episode info from episodeFile when webhook.episodes is empty for rename events
- Create proper episode data structure for process_webhook_episodes method
- Prevents full series processing (177 episodes) for single episode renames
- Dramatically improves performance for rename operations
- Version bump to 2.0.11

Resolves issue where rename webhooks were falling back to full series processing instead of targeted mode.
2025-10-09 18:10:11 -04:00
sbcrumb 84322d91d0 Merge pull request 'Fix TV webhook processing: Add missing process_webhook_episodes method' (#31) from tv-webhook into dev
Local Docker Build (Dev) / build-dev (push) Successful in 4s
Reviewed-on: #31
2025-10-09 18:04:19 -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 7ff2de6e66 Merge pull request 'sonarr-date' (#30) from sonarr-date into dev
Local Docker Build (Dev) / build-dev (push) Successful in 24s
Reviewed-on: #30
2025-10-05 10:43:34 -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 0dafcd64b2 Merge code-remove branch with TV processing fixes
Local Docker Build (Dev) / build-dev (push) Successful in 24s
Resolves TV series processing errors by fixing method calls and adding missing functionality:
- Fixed SonarrClient method names (series_by_imdb, episodes_for_series)
- Added missing get_episode_air_date method to ExternalClientManager
- Merged into dev branch at version 2.0.7
2025-10-04 11:43:37 -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 251f84edbe Merge pull request 'code-remove' (#28) from code-remove into dev
Local Docker Build (Dev) / build-dev (push) Successful in 41s
Reviewed-on: #28
2025-10-04 11:13:47 -04:00
sbcrumb 816982c0eb Add missing psutil dependency to complete requirements
- Add psutil==5.9.6 for monitoring metrics functionality
- Container confirmed: manage_nfo=True (NFO creation enabled)
- All external dependencies now included in requirements.txt
- Version bump to 2.0.6 for complete dependency resolution
2025-10-04 11:13:47 -04:00
sbcrumb 7670a16ca3 Resolve conflicts: keep complete dependencies and version 2.0.6
Local Docker Build (Dev) / build-dev (pull_request) Successful in 26s
2025-10-04 11:13:30 -04:00
sbcrumb acf741e6bb Add missing psutil dependency to complete requirements
Local Docker Build (Dev) / build-dev (pull_request) Successful in 34s
- Add psutil==5.9.6 for monitoring metrics functionality
- Container confirmed: manage_nfo=True (NFO creation enabled)
- All external dependencies now included in requirements.txt
- Version bump to 2.0.6 for complete dependency resolution
2025-10-04 11:12:23 -04:00
sbcrumb 05ce62fc0e Merge pull request 'Add missing aiohttp dependency to requirements.txt' (#27) from code-remove into dev
Local Docker Build (Dev) / build-dev (push) Successful in 1m5s
Reviewed-on: #27
2025-10-04 11:09:37 -04:00
sbcrumb 01e96038ff Add missing aiohttp dependency to requirements.txt
- Add aiohttp==3.8.6 to fix ModuleNotFoundError in runtime_validator
- Container now shows config: manage_nfo=True (confirms NFO creation enabled)
- Version bump to 2.0.5
2025-10-04 11:09:37 -04:00
sbcrumb 17aec56952 Add missing aiohttp dependency to requirements.txt
Local Docker Build (Dev) / build-dev (pull_request) Successful in 24s
- Add aiohttp==3.8.6 to fix ModuleNotFoundError in runtime_validator
- Container now shows config: manage_nfo=True (confirms NFO creation enabled)
- Version bump to 2.0.5
2025-10-04 11:08:58 -04:00
sbcrumb fc3cb50913 Merge pull request 'code-remove' (#26) from code-remove into dev
Local Docker Build (Dev) / build-dev (push) Successful in 29s
Reviewed-on: #26
2025-10-04 11:07:42 -04:00
sbcrumb 64791cb830 Resolve VERSION conflict: keep 2.0.4 for import fixes
Local Docker Build (Dev) / build-dev (pull_request) Successful in 23s
2025-10-04 11:07:14 -04:00
sbcrumb d0e4182d38 Fix missing Tuple import in async_nfo_manager.py
Local Docker Build (Dev) / build-dev (pull_request) Successful in 24s
- Add Tuple to typing imports to resolve NameError
- Fixes container startup failure after modular refactoring
- Version bump to 2.0.4
2025-10-04 11:06:07 -04:00
sbcrumb 22b78782eb Merge pull request 'code-remove' (#25) from code-remove into dev
Local Docker Build (Dev) / build-dev (push) Successful in 20s
Reviewed-on: #25
2025-10-04 11:04:48 -04:00
sbcrumb 8552fcfa87 Fix Docker entrypoint to use modular main.py instead of monolithic nfoguard.py
- Update Dockerfile to exec main.py instead of deleted nfoguard.py
- Fixes container startup failure after monolithic code removal
- Version bump to 2.0.3 for Docker compatibility fix
2025-10-04 11:04:48 -04:00
sbcrumb 08ff77760b Resolve VERSION conflict: keep 2.0.3 for Docker fixes
Local Docker Build (Dev) / build-dev (pull_request) Successful in 23s
2025-10-04 11:04:27 -04:00
sbcrumb 4c2ebae4dc Fix Docker entrypoint to use modular main.py instead of monolithic nfoguard.py
Local Docker Build (Dev) / build-dev (pull_request) Successful in 24s
- Update Dockerfile to exec main.py instead of deleted nfoguard.py
- Fixes container startup failure after monolithic code removal
- Version bump to 2.0.3 for Docker compatibility fix
2025-10-04 11:01:56 -04:00
sbcrumb 95ddc607f4 Merge pull request 'Remove monolithic nfoguard.py and add comprehensive debug logging' (#24) from code-remove into dev
Local Docker Build (Dev) / build-dev (push) Successful in 24s
Reviewed-on: #24
2025-10-04 11:00:21 -04:00
sbcrumb 72614af928 Remove monolithic nfoguard.py and add comprehensive debug logging
- Remove 2467-line monolithic nfoguard.py file to prevent confusion
- Add debug prints to identify why NFO metadata isn't being added
- Track config.manage_nfo values and function calls
- Debug dateadded parameter passing through all tiers
- Update version to 2.0.2
- This will help identify if manage_nfo is disabled or function not called
2025-10-04 11:00:21 -04:00
sbcrumb 863019f42a Remove monolithic nfoguard.py and add comprehensive debug logging
Local Docker Build (Dev) / build-dev (pull_request) Successful in 24s
- Remove 2467-line monolithic nfoguard.py file to prevent confusion
- Add debug prints to identify why NFO metadata isn't being added
- Track config.manage_nfo values and function calls
- Debug dateadded parameter passing through all tiers
- This will help identify if manage_nfo is disabled or function not called

🤖 Generated with [Claude Code](https://claude.ai/code)
2025-10-04 10:57:50 -04:00
sbcrumb b06fd3f752 Merge pull request 'fix: webhook again' (#23) from webhook-again into dev
Local Docker Build (Dev) / build-dev (push) Successful in 24s
Reviewed-on: #23
2025-10-02 16:38:19 -04:00
sbcrumb 6c5ca59ed4 fix: webhook again
Local Docker Build (Dev) / build-dev (pull_request) Successful in 19s
2025-10-02 16:37:39 -04:00
sbcrumb e7c29ddec4 Merge pull request 'fix: fixing webhook processing' (#22) from webhook-fix into dev
Local Docker Build (Dev) / build-dev (push) Successful in 24s
Reviewed-on: #22
2025-10-02 16:33:20 -04:00
sbcrumb 9f86b02665 fix: fixing webhook processing
Local Docker Build (Dev) / build-dev (pull_request) Successful in 19s
2025-10-02 16:31:07 -04:00
sbcrumb 72bfcd9eed Merge pull request 'feat: metrics' (#21) from metrics into dev
Local Docker Build (Dev) / build-dev (push) Successful in 24s
Reviewed-on: #21
2025-09-29 09:23:48 -04:00
sbcrumb ba0eed0daf feat: metrics 2025-09-29 09:23:48 -04:00
sbcrumb 8b130deec6 Merge pull request 'feat: add config validation' (#20) from improvments into dev
Local Docker Build (Dev) / build-dev (push) Successful in 9s
Reviewed-on: #20
2025-09-29 08:59:47 -04:00
sbcrumb 7e1dd50ea0 feat: add config validation 2025-09-29 08:59:47 -04:00