Commit acae00b4 by Qubad786 Committed by muzaffaryousaf

Add video source lang support for Cielo24.

parent ca2b84b0
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-10-03 15:04 # Generated by Django 1.9 on 2017-10-09 10:54
from __future__ import unicode_literals from __future__ import unicode_literals
import VEDA_OS01.models import VEDA_OS01.models
...@@ -76,7 +76,7 @@ class Migration(migrations.Migration): ...@@ -76,7 +76,7 @@ class Migration(migrations.Migration):
migrations.AddField( migrations.AddField(
model_name='video', model_name='video',
name='source_language', name='source_language',
field=models.CharField(blank=True, help_text=b'This is only needed with 3Play Media Provider', max_length=50, null=True, verbose_name=b'video source language'), field=models.CharField(blank=True, help_text=b'This is video speech language.', max_length=50, null=True, verbose_name=b'video source language'),
), ),
migrations.AddField( migrations.AddField(
model_name='video', model_name='video',
......
...@@ -480,7 +480,7 @@ class Video (models.Model): ...@@ -480,7 +480,7 @@ class Video (models.Model):
) )
source_language = models.CharField( source_language = models.CharField(
'video source language', 'video source language',
help_text='This is only needed with 3Play Media Provider', help_text="This is video speech language.",
max_length=50, max_length=50,
null=True, null=True,
blank=True, blank=True,
......
...@@ -14,7 +14,8 @@ from VEDA_OS01.models import (Cielo24Fidelity, Cielo24Turnaround, Course, ...@@ -14,7 +14,8 @@ from VEDA_OS01.models import (Cielo24Fidelity, Cielo24Turnaround, Course,
from VEDA_OS01.utils import build_url from VEDA_OS01.utils import build_url
VIDEO_DATA = { VIDEO_DATA = {
'studio_id': '12345' 'studio_id': '12345',
'source_language': 'en'
} }
...@@ -121,7 +122,7 @@ class Cielo24TranscriptTests(TestCase): ...@@ -121,7 +122,7 @@ class Cielo24TranscriptTests(TestCase):
'https://sandbox.cielo24.com/api/job/new', 'https://sandbox.cielo24.com/api/job/new',
v=1, v=1,
job_name='12345', job_name='12345',
language='en', language='en', # A job's language.
api_token='cielo24_api_key', api_token='cielo24_api_key',
), ),
'body': None, 'body': None,
......
...@@ -206,7 +206,7 @@ class Cielo24Transcript(object): ...@@ -206,7 +206,7 @@ class Cielo24Transcript(object):
self.cielo24_api_base_url, self.cielo24_api_base_url,
self.cielo24_new_job, self.cielo24_new_job,
v=1, v=1,
language='en', language=self.video.source_language,
api_token=self.api_key, api_token=self.api_key,
job_name=self.video.studio_id job_name=self.video.studio_id
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment