File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2285,10 +2285,11 @@ def seconds_to_timecode(inp: str) -> str:
22852285 return f"{ hour :02d} :{ minute :02d} :{ second :02d} "
22862286
22872287 for ich , ch in enumerate (chap ):
2288- chap [ich ]["start_time" ] = seconds_to_timecode (chap [ich ]["start_time" ])
2289- chap [ich ]["end_time" ] = seconds_to_timecode (chap [ich ]["end_time" ])
2288+ chap [ich ]["start" ] = seconds_to_timecode (chap [ich ]["start_time" ])
2289+ chap [ich ]["end" ] = seconds_to_timecode (chap [ich ]["end_time" ])
2290+ del chap [ich ]["start_time" ], chap [ich ]["end_time" ]
22902291
2291- meta ["yt_chapters" ] = chap
2292+ meta ["yt_chapters" ] = json . dumps ( chap , ensure_ascii = False )
22922293
22932294 def timecode_to_second (inp : str ) -> float :
22942295 "turns a vtt timecode into seconds"
You can’t perform that action at this time.
0 commit comments