Debugging the TEN service
This commit is contained in:
+15
-12
@@ -34,12 +34,19 @@ class TenService(BaseService):
|
||||
print(f"❌ Error: Ten requires 'source_season' in series.json for '{show_title}'")
|
||||
return None
|
||||
|
||||
if config.get("source_url"):
|
||||
url = config["source_url"]
|
||||
else:
|
||||
slug = self.slugify(show_title)
|
||||
# Ten URL structure: /v/show-name/season-YYYY or /v/show-name/season-X
|
||||
url = f"https://10play.com.au/{slug}/episodes/season-{source_season}"
|
||||
if source_url:
|
||||
url = source_url
|
||||
else:
|
||||
slug = self.slugify(show_title)
|
||||
# Ten URL structure: /v/show-name/episodes/YYYY or /v/show-name/episodes/season-X
|
||||
s_str = str(source_season)
|
||||
|
||||
if len(s_str) == 4:
|
||||
season_path = s_str
|
||||
else:
|
||||
season_path = f"season-{s_str}"
|
||||
|
||||
url = f"https://10play.com.au/{slug}/episodes/{season_path}"
|
||||
|
||||
print(f"🔎 Querying Ten: {url}")
|
||||
data = self.run_ytdlp_json(url)
|
||||
@@ -72,15 +79,11 @@ class TenService(BaseService):
|
||||
show_clean = output_title.replace(" ", ".")
|
||||
title_clean = clean_title.replace(" ", ".")
|
||||
|
||||
filename = f"{show_clean}.S{s_val:02d}E{episode_idx:02d}.{title_clean}".strip(".")
|
||||
# filename = f"{show_clean}.S{s_val:02d}E{episode_idx:02d}.{title_clean}".strip(".") # With episode title
|
||||
filename = f"{show_clean}.S{s_val:02d}E{episode_idx:02d}".strip(".") # Without episode title
|
||||
|
||||
return {
|
||||
"show": show_clean,
|
||||
"episode_id": episode_id,
|
||||
"filename": filename
|
||||
}
|
||||
|
||||
def download_episode(self, episode, entry, download_dir):
|
||||
# You can reuse the logic from your iViewService here
|
||||
# Just ensure --netrc is included in the final subprocess call
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user