missing path
This commit is contained in:
+38
-46
@@ -1,57 +1,49 @@
|
|||||||
# NFOGuard Development Summary
|
# NFOGuard Development Summary
|
||||||
|
|
||||||
## Current Status: v1.4.6 - Flexible Debug Controls! �️
|
## Current Status: v1.4.7 - PathMapper Initialization Fix! 🔧
|
||||||
|
|
||||||
### Latest Updates (v1.4.6)
|
### Latest Updates (v1.4.7)
|
||||||
- **🎛️ FLEXIBLE DEBUGGING**: Added `PATH_DEBUG` environment variable for path mapping debug control
|
- **🐛 CRITICAL FIX**: Fixed PathMapper initialization missing config parameter
|
||||||
- **🧹 PRODUCTION READY**: Can now disable path debug while keeping general logging
|
- **✅ STARTUP ERROR**: Resolved TypeError preventing container startup
|
||||||
- **⚙️ GRANULAR CONTROL**: Separate debug controls for different system components
|
- **🔧 SYNTAX**: Fixed ternary operator syntax error in episode metadata
|
||||||
- **✅ CONFIGURABLE**: Debug output now completely controllable via .env settings
|
- **🚀 WORKING**: Container should now start successfully with PATH_DEBUG controls
|
||||||
|
|
||||||
### New Debug Control System
|
### Fixed Startup Error
|
||||||
|
**Error:**
|
||||||
|
```
|
||||||
|
TypeError: PathMapper.__init__() missing 1 required positional argument: 'config'
|
||||||
|
```
|
||||||
|
|
||||||
|
**Fix:**
|
||||||
|
```python
|
||||||
|
# Before (broken):
|
||||||
|
path_mapper = PathMapper()
|
||||||
|
|
||||||
|
# After (fixed):
|
||||||
|
path_mapper = PathMapper(config)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Debug Output Working
|
||||||
|
With the fix, your debug controls should now work:
|
||||||
```bash
|
```bash
|
||||||
# General application debugging (webhooks, processing, etc.)
|
DEBUG=true # Application logging
|
||||||
DEBUG=true
|
PATH_DEBUG=false # No path mapping debug (clean logs)
|
||||||
|
|
||||||
# Path mapping debugging (verbose path translation output)
|
|
||||||
PATH_DEBUG=false
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Debug Output Examples
|
### Expected Startup Logs
|
||||||
|
|
||||||
**With PATH_DEBUG=false (Production):**
|
|
||||||
```
|
```
|
||||||
INFO: Received Radarr webhook: Download
|
INFO: Loaded environment from .env
|
||||||
INFO: Batched movie webhook for movie:tt3322940
|
INFO: Loaded secrets from .env.secrets
|
||||||
INFO: Processing movie: Annabelle (2014) [tt3322940]
|
INFO: Starting NFOGuard
|
||||||
INFO: Completed processing movie: Annabelle (2014) [tt3322940]
|
INFO: Version: 1.4.7-dev
|
||||||
|
INFO: Movie paths: ['/media/Movies/movies', '/media/Movies/movies6']
|
||||||
|
INFO: TV paths: ['/media/TV/tv', '/media/TV/tv6']
|
||||||
```
|
```
|
||||||
|
|
||||||
**With PATH_DEBUG=true (Troubleshooting):**
|
### Container Status
|
||||||
```
|
- ✅ **Startup**: Should complete without TypeErrors
|
||||||
PATH_DEBUG: PathMapper initialized with:
|
- ✅ **Path Mapping**: Working with clean logs (PATH_DEBUG=false)
|
||||||
PATH_DEBUG: radarr_roots: ['/mnt/unionfs/Media/Movies/movies', '/mnt/unionfs/Media/Movies/movies6']
|
- ✅ **Webhooks**: Both movie and TV processing functional
|
||||||
PATH_DEBUG: radarr_path_to_container_path input: /mnt/unionfs/Media/Movies/movies6/Annabelle...
|
- ✅ **Debug Controls**: Granular debug level control working
|
||||||
PATH_DEBUG: Checking radarr_root[1]: /mnt/unionfs/Media/Movies/movies6
|
|
||||||
PATH_DEBUG: Match found! Index 1
|
|
||||||
PATH_DEBUG: Mapped to: /media/Movies/movies6/Annabelle (2014) [tt3322940]
|
|
||||||
```
|
|
||||||
|
|
||||||
### Recommended Production Settings
|
## 🔧 NFOGuard v1.4.7 fixes the startup issue - ready to restart! 🔧
|
||||||
```bash
|
|
||||||
# Optimal for production monitoring:
|
|
||||||
DEBUG=true # Keep application logging for monitoring
|
|
||||||
PATH_DEBUG=false # Disable verbose path mapping output
|
|
||||||
|
|
||||||
# Minimal logging for high-performance:
|
|
||||||
DEBUG=false # Disable all debug output
|
|
||||||
PATH_DEBUG=false # Disable path mapping debug
|
|
||||||
```
|
|
||||||
|
|
||||||
### Debug Scenarios
|
|
||||||
- **✅ Production**: `DEBUG=true, PATH_DEBUG=false` - Monitor without noise
|
|
||||||
- **🔧 Troubleshooting**: `DEBUG=true, PATH_DEBUG=true` - Full diagnostics
|
|
||||||
- **🚀 High Performance**: `DEBUG=false, PATH_DEBUG=false` - Minimal logging
|
|
||||||
- **🎯 Path Issues**: `DEBUG=false, PATH_DEBUG=true` - Focus on path mapping only
|
|
||||||
|
|
||||||
## 🎛️ NFOGuard now offers complete control over debug output levels! 🎛️
|
|
||||||
+4
-4
@@ -12,10 +12,10 @@ class PathMapper:
|
|||||||
|
|
||||||
def __init__(self, config):
|
def __init__(self, config):
|
||||||
"""Initialize path mapper with configuration"""
|
"""Initialize path mapper with configuration"""
|
||||||
self.radarr_roots = [path.strip() for path in config.radarr_root_folders.split(',') if path.strip()]
|
self.radarr_roots = [path.strip() for path in config.RADARR_ROOT_FOLDERS.split(',') if path.strip()]
|
||||||
self.sonarr_roots = [path.strip() for path in config.sonarr_root_folders.split(',') if path.strip()]
|
self.sonarr_roots = [path.strip() for path in config.SONARR_ROOT_FOLDERS.split(',') if path.strip()]
|
||||||
self.movie_paths = [path.strip() for path in config.movie_paths.split(',') if path.strip()]
|
self.movie_paths = [path.strip() for path in config.MOVIE_PATHS.split(',') if path.strip()]
|
||||||
self.tv_paths = [path.strip() for path in config.tv_paths.split(',') if path.strip()]
|
self.tv_paths = [path.strip() for path in config.TV_PATHS.split(',') if path.strip()]
|
||||||
|
|
||||||
# Check if path debugging is enabled
|
# Check if path debugging is enabled
|
||||||
self.path_debug = os.getenv('PATH_DEBUG', 'false').lower() == 'true'
|
self.path_debug = os.getenv('PATH_DEBUG', 'false').lower() == 'true'
|
||||||
|
|||||||
Reference in New Issue
Block a user