Debugging the TEN service

This commit is contained in:
2026-05-15 00:00:57 +09:30
parent 887841b901
commit 1cbd080821
4 changed files with 40 additions and 19 deletions
+6 -4
View File
@@ -2,6 +2,7 @@
import argparse
import sys
import json
from pathlib import Path
from services.iview import iViewService
from services.ten import TenService
@@ -24,7 +25,7 @@ class AutoGrabber:
self.config_dir = Path(config_dir)
self.history_file = self.config_dir / "history"
self.series_file = self.config_dir / "series"
self.series_file = self.config_dir / "series.json"
self.dry_run = dry_run
self.mark_existing = mark_existing
@@ -80,6 +81,7 @@ class AutoGrabber:
def process_show(self, config):
service_name = config.get("service")
source_title = config.get("source_title")
source_url = config.get("source_url")
if not service_name or not source_title:
print(f"❌ Skipping invalid entry: {config} (Missing service or source_title)")
@@ -103,7 +105,7 @@ class AutoGrabber:
print("==============================")
# 3. Discovery (Ten will handle its own requirement for source_season)
seasons = service.discover_seasons(source_title, source_season=source_season)
seasons = service.discover_seasons(source_title, source_season=source_season, source_url=source_url)
if not seasons:
# Service will have already printed its specific error message
@@ -146,8 +148,8 @@ class AutoGrabber:
self.save_history()
def run(self):
for service, source, output in self.series_list:
self.process_show(service, source, output)
for show_config in self.series_list:
self.process_show(show_config)
print("\n✅ Done.")
# -------------------------