fix: Update subtitle download function to return duration_mins
This commit is contained in:
@@ -88,7 +88,7 @@ def download_subtitles(url: str, quiet: bool = False) -> Tuple[bool, Optional[Pa
|
|||||||
|
|
||||||
if not vtt_files:
|
if not vtt_files:
|
||||||
print("No VTT file found after download", file=sys.stderr)
|
print("No VTT file found after download", file=sys.stderr)
|
||||||
return False, None
|
return False, None, 0
|
||||||
|
|
||||||
return True, vtt_files[0], duration_mins
|
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)}")
|
print(f"Debug: Full exception info: {type(e).__name__}: {str(e)}")
|
||||||
import traceback
|
import traceback
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
return False, None
|
return False, None, 0
|
||||||
|
|
||||||
|
|
||||||
def clean_vtt_text(text: str) -> str:
|
def clean_vtt_text(text: str) -> str:
|
||||||
|
|||||||
Reference in New Issue
Block a user