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

Translation bugs #400

Merged
merged 4 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
22 changes: 22 additions & 0 deletions backend/project/migrations/0011_project_video_integration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 3.2.16 on 2023-07-21 07:34

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("project", "0010_alter_project_default_target_languages"),
]

operations = [
migrations.AddField(
model_name="project",
name="video_integration",
field=models.BooleanField(
default=False,
help_text="Indicates whether video integration is needed for VO tasks or not.",
verbose_name="require_video_integration",
),
),
]
7 changes: 7 additions & 0 deletions backend/project/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,13 @@ class Project(models.Model):
blank=True,
null=True,
)
video_integration = models.BooleanField(
verbose_name="require_video_integration",
default=False,
help_text=(
"Indicates whether video integration is needed for VO tasks or not."
),
)

def __str__(self):
return str(self.title)
1 change: 1 addition & 0 deletions backend/project/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ class Meta:
"default_eta",
"default_priority",
"default_description",
"video_integration",
]
7 changes: 5 additions & 2 deletions backend/transcript/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ def celery_align_json(transcript_id):
"Chitralekha_Video_{}_{}".format(transcript_obj.video.id, time_now)
+ ".ytt"
)
ytt_genorator(data, file_name, prev_line_in=0, mode="data")
upload_ytt_to_azure(transcript_obj, file_name)
try:
ytt_genorator(data, file_name, prev_line_in=0, mode="data")
upload_ytt_to_azure(transcript_obj, file_name)
except:
print("Error in converting ytt to json.")
os.remove(file_name)
18 changes: 18 additions & 0 deletions backend/video/migrations/0018_alter_video_speaker_info.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.16 on 2023-07-23 21:38

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("video", "0017_video_multiple_speaker"),
]

operations = [
migrations.AlterField(
model_name="video",
name="speaker_info",
field=models.JSONField(blank=True, null=True, verbose_name="Speakers Info"),
),
]
2 changes: 1 addition & 1 deletion backend/video/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Video(models.Model):
blank=True,
verbose_name="Gender",
)
speaker_info = models.JSONField(verbose_name="Speakers Info", null=True)
speaker_info = models.JSONField(verbose_name="Speakers Info", null=True, blank=True)
multiple_speaker = models.BooleanField(
verbose_name="Multiple Speaker",
default=False,
Expand Down
2 changes: 1 addition & 1 deletion backend/voiceover/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def celery_integration(file_name, voice_over_obj_id, video, task_id):
voice_over_obj = VoiceOver.objects.filter(id=voice_over_obj_id).first()
task = Task.objects.filter(id=task_id).first()
integrate_audio_with_video(file_name, voice_over_obj, voice_over_obj.video)
if not os.path.isfile(file_name + ".mp4") or os.path.isfile(file_name + ".mp3"):
if not os.path.isfile(file_name + ".mp4") or os.path.isfile(file_name + ".wav"):
task.status = "FAILED"
task.save()
logging.info("Error in integrating audio and video")
Expand Down
Loading
Loading