[O] No failing silently
This commit is contained in:
+3
-6
@@ -67,8 +67,7 @@ def process_imdb_workflow(imdb_id: str, dl_dir: str = "/data/QB", jellyfin_base_
|
|||||||
print(f"=== [0] Fetching IMDB info for {imdb_id} ===")
|
print(f"=== [0] Fetching IMDB info for {imdb_id} ===")
|
||||||
imdb_info = mteam_imdb_info(imdb_id)
|
imdb_info = mteam_imdb_info(imdb_id)
|
||||||
if 'data' not in imdb_info:
|
if 'data' not in imdb_info:
|
||||||
print("Failed to get IMDB info")
|
raise ValueError(f"Failed to get IMDB info from M-Team: {imdb_info}")
|
||||||
return
|
|
||||||
|
|
||||||
title = imdb_info['data'].get('title', 'Unknown_Title')
|
title = imdb_info['data'].get('title', 'Unknown_Title')
|
||||||
year = imdb_info['data'].get('year', '')
|
year = imdb_info['data'].get('year', '')
|
||||||
@@ -108,8 +107,7 @@ def process_imdb_workflow(imdb_id: str, dl_dir: str = "/data/QB", jellyfin_base_
|
|||||||
torrents = []
|
torrents = []
|
||||||
|
|
||||||
if not torrents:
|
if not torrents:
|
||||||
print("No torrents found.")
|
raise ValueError(f"No torrents found on M-Team for IMDb ID: {imdb_id}")
|
||||||
return
|
|
||||||
|
|
||||||
# Format the torrents text
|
# Format the torrents text
|
||||||
formatted_torrents = []
|
formatted_torrents = []
|
||||||
@@ -124,8 +122,7 @@ def process_imdb_workflow(imdb_id: str, dl_dir: str = "/data/QB", jellyfin_base_
|
|||||||
print(f"Selected torrent IDs: {selected_ids}")
|
print(f"Selected torrent IDs: {selected_ids}")
|
||||||
|
|
||||||
if not selected_ids:
|
if not selected_ids:
|
||||||
print("No torrents selected.")
|
raise ValueError(f"LLM did not select any torrents for IMDb ID: {imdb_id}")
|
||||||
return
|
|
||||||
|
|
||||||
for tid in selected_ids:
|
for tid in selected_ids:
|
||||||
print(f"\n=== [3] Downloading .torrent for ID: {tid} ===")
|
print(f"\n=== [3] Downloading .torrent for ID: {tid} ===")
|
||||||
|
|||||||
Reference in New Issue
Block a user