updates to paths again
This commit is contained in:
+12
-4
@@ -12,10 +12,18 @@ class PathMapper:
|
||||
|
||||
def __init__(self, config):
|
||||
"""Initialize path mapper with configuration"""
|
||||
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.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()]
|
||||
# Use environment variables directly since config attribute names are unclear
|
||||
import os
|
||||
|
||||
radarr_roots_str = os.getenv('RADARR_ROOT_FOLDERS', '')
|
||||
sonarr_roots_str = os.getenv('SONARR_ROOT_FOLDERS', '')
|
||||
movie_paths_str = os.getenv('MOVIE_PATHS', '')
|
||||
tv_paths_str = os.getenv('TV_PATHS', '')
|
||||
|
||||
self.radarr_roots = [path.strip() for path in radarr_roots_str.split(',') if path.strip()]
|
||||
self.sonarr_roots = [path.strip() for path in sonarr_roots_str.split(',') if path.strip()]
|
||||
self.movie_paths = [path.strip() for path in movie_paths_str.split(',') if path.strip()]
|
||||
self.tv_paths = [path.strip() for path in tv_paths_str.split(',') if path.strip()]
|
||||
|
||||
# Check if path debugging is enabled
|
||||
self.path_debug = os.getenv('PATH_DEBUG', 'false').lower() == 'true'
|
||||
|
||||
Reference in New Issue
Block a user