Spaces:
Runtime error
Runtime error
Bug Fixes
Browse files- main.py +2 -2
- media_download.py +3 -3
main.py
CHANGED
@@ -311,10 +311,10 @@ async def get_rendered_video(user_id: str, video_format: str, video_quality: str
|
|
311 |
media_path = users_context[user_id]['downloader'].download('video', video_format, video_quality)
|
312 |
|
313 |
# Getting Required Subtitles
|
314 |
-
if subtitles_type.lower()
|
315 |
subtitles_path = users_context[user_id]['transcript_path']
|
316 |
|
317 |
-
elif subtitles_type.lower()
|
318 |
|
319 |
# Getting Translated Subtitles from the context for this user's session
|
320 |
translated_subtitles = users_context[user_id]['translated_subtitles']
|
|
|
311 |
media_path = users_context[user_id]['downloader'].download('video', video_format, video_quality)
|
312 |
|
313 |
# Getting Required Subtitles
|
314 |
+
if 'original' in subtitles_type.lower():
|
315 |
subtitles_path = users_context[user_id]['transcript_path']
|
316 |
|
317 |
+
elif 'translated' in subtitles_type.lower():
|
318 |
|
319 |
# Getting Translated Subtitles from the context for this user's session
|
320 |
translated_subtitles = users_context[user_id]['translated_subtitles']
|
media_download.py
CHANGED
@@ -352,7 +352,7 @@ class YoutubeDownloader(MediaDownloader):
|
|
352 |
|
353 |
else:
|
354 |
print('Unexpected Video Format Encountered:', video_format)
|
355 |
-
|
356 |
|
357 |
# Download Command
|
358 |
command = [
|
@@ -427,7 +427,7 @@ class YoutubeDownloader(MediaDownloader):
|
|
427 |
|
428 |
else:
|
429 |
print('Unexpected Video Format Encountered:', media_format)
|
430 |
-
|
431 |
|
432 |
# Download Command
|
433 |
command = [
|
@@ -536,7 +536,7 @@ class YoutubeDownloader(MediaDownloader):
|
|
536 |
|
537 |
else:
|
538 |
print('Unexpected Video Format Encountered:', video_format)
|
539 |
-
|
540 |
|
541 |
# Download Command
|
542 |
command = [
|
|
|
352 |
|
353 |
else:
|
354 |
print('Unexpected Video Format Encountered:', video_format)
|
355 |
+
sys.exit(0)
|
356 |
|
357 |
# Download Command
|
358 |
command = [
|
|
|
427 |
|
428 |
else:
|
429 |
print('Unexpected Video Format Encountered:', media_format)
|
430 |
+
sys.exit(0)
|
431 |
|
432 |
# Download Command
|
433 |
command = [
|
|
|
536 |
|
537 |
else:
|
538 |
print('Unexpected Video Format Encountered:', video_format)
|
539 |
+
sys.exit(0)
|
540 |
|
541 |
# Download Command
|
542 |
command = [
|