fix: Add missing config parameter to debug scripts
Local Docker Build (Dev) / build-dev (push) Successful in 4s
Local Docker Build (Dev) / build-dev (push) Successful in 4s
- Fixed debug_movie.py and debug_tv.py to pass required config parameter - Resolves TypeError when initializing NFOGuardDatabase - Both scripts now work properly for command-line debugging
This commit is contained in:
+2
-1
@@ -10,6 +10,7 @@ from pathlib import Path
|
|||||||
sys.path.insert(0, str(Path(__file__).parent))
|
sys.path.insert(0, str(Path(__file__).parent))
|
||||||
|
|
||||||
from core.database import NFOGuardDatabase
|
from core.database import NFOGuardDatabase
|
||||||
|
from config.settings import config
|
||||||
|
|
||||||
def debug_movie(imdb_id: str):
|
def debug_movie(imdb_id: str):
|
||||||
"""Debug a specific movie's data"""
|
"""Debug a specific movie's data"""
|
||||||
@@ -17,7 +18,7 @@ def debug_movie(imdb_id: str):
|
|||||||
print("=" * 50)
|
print("=" * 50)
|
||||||
|
|
||||||
# Initialize database
|
# Initialize database
|
||||||
db = NFOGuardDatabase()
|
db = NFOGuardDatabase(config=config)
|
||||||
|
|
||||||
# Get movie data
|
# Get movie data
|
||||||
movie = db.get_movie_dates(imdb_id)
|
movie = db.get_movie_dates(imdb_id)
|
||||||
|
|||||||
+4
-3
@@ -10,6 +10,7 @@ from pathlib import Path
|
|||||||
sys.path.insert(0, str(Path(__file__).parent))
|
sys.path.insert(0, str(Path(__file__).parent))
|
||||||
|
|
||||||
from core.database import NFOGuardDatabase
|
from core.database import NFOGuardDatabase
|
||||||
|
from config.settings import config
|
||||||
|
|
||||||
def debug_series(imdb_id: str):
|
def debug_series(imdb_id: str):
|
||||||
"""Debug a specific TV series' data"""
|
"""Debug a specific TV series' data"""
|
||||||
@@ -17,7 +18,7 @@ def debug_series(imdb_id: str):
|
|||||||
print("=" * 60)
|
print("=" * 60)
|
||||||
|
|
||||||
# Initialize database
|
# Initialize database
|
||||||
db = NFOGuardDatabase()
|
db = NFOGuardDatabase(config=config)
|
||||||
|
|
||||||
# Get series episodes
|
# Get series episodes
|
||||||
episodes = db.get_series_episodes(imdb_id)
|
episodes = db.get_series_episodes(imdb_id)
|
||||||
@@ -78,7 +79,7 @@ def debug_episode(imdb_id: str, season: int, episode: int):
|
|||||||
print("=" * 60)
|
print("=" * 60)
|
||||||
|
|
||||||
# Initialize database
|
# Initialize database
|
||||||
db = NFOGuardDatabase()
|
db = NFOGuardDatabase(config=config)
|
||||||
|
|
||||||
# Get specific episode
|
# Get specific episode
|
||||||
episode_data = db.get_episode_date(imdb_id, season, episode)
|
episode_data = db.get_episode_date(imdb_id, season, episode)
|
||||||
@@ -136,7 +137,7 @@ def debug_season(imdb_id: str, season: int):
|
|||||||
print("=" * 60)
|
print("=" * 60)
|
||||||
|
|
||||||
# Initialize database
|
# Initialize database
|
||||||
db = NFOGuardDatabase()
|
db = NFOGuardDatabase(config=config)
|
||||||
|
|
||||||
# Get series episodes
|
# Get series episodes
|
||||||
all_episodes = db.get_series_episodes(imdb_id)
|
all_episodes = db.get_series_episodes(imdb_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user