mirror of
https://github.com/Screenly/Anthias.git
synced 2026-03-04 15:01:16 -05:00
Allow setting custom time limit for video assets (to be able to swtich to livestreams for a limited time)
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user