Unverified Commit acbb9219 by Gregory Martin Committed by GitHub

Revert "Eliminate XuetangX, Add Migrations"

parent 77d04caf
......@@ -20,6 +20,7 @@
"encode_bitdepth": "27",
"encode_resolution": "720",
"product_spec": "desktop_mp4",
"xuetang_proc": true
}
},
{
......@@ -34,6 +35,7 @@
"encode_bitdepth": "0",
"encode_resolution": "0",
"product_spec": "hls",
"xuetang_proc": false
}
},
{
......@@ -48,6 +50,7 @@
"encode_bitdepth": "27",
"encode_resolution": "360",
"product_spec": "mobile_low",
"xuetang_proc": false
}
},
{
......@@ -65,6 +68,7 @@
"s3_proc": true,
"xue": true,
"local_storedir": "course-v1:VEDA+VEDA201+2015_T1",
"xuetang_proc": false,
"studio_hex": "xxxx"
}
}
......
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-10-24 20:03
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('VEDA_OS01', '0002_auto_20171016_1211'),
]
operations = [
migrations.RemoveField(
model_name='course',
name='xuetang_proc',
),
migrations.RemoveField(
model_name='encode',
name='xuetang_proc',
),
migrations.RemoveField(
model_name='url',
name='md5_sum',
),
migrations.RemoveField(
model_name='url',
name='xuetang_input',
),
]
......@@ -378,6 +378,7 @@ class Course(models.Model):
max_length=5000,
null=True, blank=True
)
xuetang_proc = models.BooleanField('Submit to XuetangX', default=True)
sg_projID = models.IntegerField('Shotgun Project ID', default=0)
studio_hex = models.CharField(
'Studio Hex ID',
......@@ -577,6 +578,7 @@ class Encode(models.Model):
'VAL Profile Name',
max_length=300,
null=True, blank=True)
xuetang_proc = models.BooleanField('Submit to XuetangX', default=False)
def __unicode__(self):
return u'{encode_profile}'.format(encode_profile=self.encode_name)
......@@ -598,6 +600,8 @@ class URL(models.Model):
)
encode_size = models.IntegerField('File Size (bytes)', default="0", null=True, blank=True)
val_input = models.BooleanField('Inputted to EDX-VAL?', default=False)
xuetang_input = models.BooleanField('Inputted to XuetangX?', default=False)
md5_sum = models.CharField('MD5 Sum', max_length=100, null=True, blank=True)
class Meta:
get_latest_by = 'url_date'
......
......@@ -186,6 +186,7 @@ class EncodeSerializer(serializers.ModelSerializer):
'encode_bitdepth',
'encode_resolution',
'product_spec',
'xuetang_proc',
)
......@@ -203,6 +204,8 @@ class URLSerializer(serializers.ModelSerializer):
'encode_bitdepth',
'encode_size',
'val_input',
'xuetang_input',
'md5_sum',
)
def create(self, validated_data):
......
......@@ -116,10 +116,13 @@ class VedaDelivery:
u1.encode_duration = self.video_proto.duration
u1.encode_bitdepth = self.video_proto.bitrate
u1.encode_size = self.video_proto.filesize
u1.md5_sum = self.video_proto.hash_sum
u1.save()
self.status = self._DETERMINE_STATUS()
self._UPDATE_DATA()
self._CLEANUP()
# Transcription Process
......@@ -608,3 +611,11 @@ class VedaDelivery:
encode_profile=self.encode_profile
)
DY.upload()
def main():
pass
if __name__ == '__main__':
sys.exit(main())
......@@ -81,6 +81,7 @@ class VideoProto():
self.bitrate = None
self.resolution = None
self.veda_id = None
self.hash_sum = None
class VedaIngest:
......@@ -182,6 +183,10 @@ class VedaIngest:
"""
self.video_proto.filesize = os.stat(self.full_filename).st_size
self.video_proto.hash_sum = hashlib.md5(
open(self.full_filename, 'rb').read()
).hexdigest()
ff_command = ' '.join((
FFPROBE,
"\'" + self.full_filename + "\'"
......
......@@ -215,6 +215,7 @@ class VideoProto():
self.resolution = None
self.veda_id = kwargs.get('veda_id', None)
self.val_id = kwargs.get('val_id', None)
self.hash_sum = None
class Metadata():
......@@ -244,6 +245,10 @@ class Metadata():
"""
self.video_proto.filesize = os.stat(self.full_filename).st_size
self.video_proto.hash_sum = hashlib.md5(
open(self.full_filename, 'rb').read()
).hexdigest()
ff_command = ' '.join((
FFPROBE,
"\'" + self.full_filename + "\'"
......
......@@ -26,6 +26,7 @@ bools:
- c24_proc
- s3_proc
- xue
- xuetang_proc
# dropdown boxes
dropdowns:
......@@ -55,6 +56,7 @@ organizational:
review_proc: encode
proc_loc: encode
xue: encode
xuetang_proc: encode
yt_logon: encode
tp_proc: transcribe
......
......@@ -136,6 +136,8 @@ sg_script_key:
# Endpoints
# ---
threeplay_ftphost:
xuetang_api_url:
xuetang_api_shared_secret:
## Encoding Config
ffmpeg_compiled: "ffmpeg"
......
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