Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import rem #969

Merged
merged 3 commits into from
Jan 7, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions backend/translation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@
from yt_dlp import YoutubeDL
import pandas as pd
from glossary.tmx.tmxservice import TMXService
from youtube_thubmnail_extractor.extractor import YouTubeThumbnailExtractor
from PIL import Image
from io import BytesIO
from docx.shared import Cm
from docx import Document
from django.http import StreamingHttpResponse
import math

import subprocess

def convert_to_scc(subtitles):
scc_lines = ["Scenarist_SCC V1.0"]
Expand Down Expand Up @@ -153,7 +152,7 @@ def convert_to_paragraph(lines, video_name):

return content

import subprocess

def get_format_code(video_url, resolutions=["480p", "360p", "144p", "720p", "1080p"]):
"""
Get the format code for the first available resolution from the video URL using yt-dlp.
Expand Down