Allow setting custom time limit for video assets (to be able to swtich to livestreams for a limited time)

This commit is contained in:
Sebastian
2014-07-06 15:09:49 +00:00
parent 5e3828a2f8
commit d558ccfd06
3 changed files with 3 additions and 3 deletions

View File

@@ -163,7 +163,7 @@ def prepare_asset(request):
break
f.write(chunk)
if "video" in asset['mimetype']:
if "video" in asset['mimetype'] and get('duration')=="-1":
video_duration = get_video_duration(asset['uri'])
if video_duration:
asset['duration'] = int(video_duration.total_seconds())

View File

@@ -95,7 +95,7 @@ API.View.EditAssetView = class EditAssetView extends Backbone.View
(@$ '#modalLabel').text "Edit Asset"
(@$ '.asset-location').hide(); (@$ '.asset-location.edit').show()
(@$ '.duration').toggle ((@model.get 'mimetype') != 'video')
(@$ '.duration').toggle (true)
@clickTabNavUri() if (@model.get 'mimetype') == 'webpage'
for field in @model.fields

View File

@@ -214,7 +214,7 @@
(this.$('.asset-location')).hide();
(this.$('.asset-location.edit')).show();
}
(this.$('.duration')).toggle((this.model.get('mimetype')) !== 'video');
(this.$('.duration')).toggle(true);
if ((this.model.get('mimetype')) === 'webpage') {
this.clickTabNavUri();
}