Skip to content

Commit

Permalink
Fixup. Format code with Black
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jan 16, 2024
1 parent d79ba51 commit 6eda22a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pod/video/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1219,7 +1219,7 @@ def video_transcript(request, slug=None):
)
return redirect(reverse("video:video_edit", args=(video.slug,)))

if video.get_video_mp3() :
if video.get_video_mp3():
available_transcript_lang = [lang[0] for lang in get_transcription_choices()]
if (
request.GET.get("lang", "") != ""
Expand Down
2 changes: 1 addition & 1 deletion pod/video_encode_transcript/transcript.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def improveCaptionsAccessibility(webvtt):
sent = split_string(caption.text, 40, sep=" ")
if len(sent) > 2:
num_captions = int(len(sent) / 2)
if len(sent) % 2 :
if len(sent) % 2:
num_captions += 1
dur = caption.end_in_seconds - caption.start_in_seconds
for x in range(num_captions):
Expand Down
2 changes: 1 addition & 1 deletion pod/video_encode_transcript/transcript_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ def sec_to_timestamp(total_seconds):
hours = int(total_seconds / 3600)
minutes = int(total_seconds / 60 - hours * 60)
seconds = total_seconds - hours * 3600 - minutes * 60
return '{:02d}:{:02d}:{:06.3f}'.format(hours, minutes, seconds)
return "{:02d}:{:02d}:{:06.3f}".format(hours, minutes, seconds)


def get_text_caption(text_caption, last_word_added):
Expand Down

0 comments on commit 6eda22a

Please sign in to comment.