forked from 0x2620/pandora
round duration to 3
This commit is contained in:
parent
f642c010cd
commit
7b401cfe28
2 changed files with 4 additions and 2 deletions
|
@ -82,7 +82,9 @@ class Edit(models.Model):
|
|||
# dont add clip if in/out are invalid
|
||||
if not clip.annotation:
|
||||
duration = clip.item.sort.duration
|
||||
if clip.start > clip.end or clip.start >= duration or clip.end > duration:
|
||||
if clip.start > clip.end \
|
||||
or round(clip.start, 3) >= round(duration, 3) \
|
||||
or round(clip.end, 3) > round(duration, 3):
|
||||
return False
|
||||
clip.save()
|
||||
ids.insert(index, clip.id)
|
||||
|
|
|
@ -189,7 +189,7 @@ pandora.ui.cacheDialog = function() {
|
|||
keys: ['id', 'clips']
|
||||
}, function(result) {
|
||||
Ox.unique(result.data.clips.map(function(clip) {
|
||||
return clip.item
|
||||
return clip.item;
|
||||
})).forEach(function(item) {
|
||||
var update = false;
|
||||
pandora.fs.cacheVideo(item, function(data) {
|
||||
|
|
Loading…
Reference in a new issue