fix: Update subtitle download function to return duration_mins

This commit is contained in:
2025-01-03 14:05:41 +01:00
parent 6d27e00f8a
commit 3bcc5164e1

View File

@@ -88,7 +88,7 @@ def download_subtitles(url: str, quiet: bool = False) -> Tuple[bool, Optional[Pa
if not vtt_files:
print("No VTT file found after download", file=sys.stderr)
return False, None
return False, None, 0
return True, vtt_files[0], duration_mins
@@ -98,7 +98,7 @@ def download_subtitles(url: str, quiet: bool = False) -> Tuple[bool, Optional[Pa
print(f"Debug: Full exception info: {type(e).__name__}: {str(e)}")
import traceback
traceback.print_exc()
return False, None
return False, None, 0
def clean_vtt_text(text: str) -> str: