fix clip patch
This commit is contained in:
parent
f1d55b89d4
commit
d2abf860b9
1 changed files with 4 additions and 6 deletions
|
@ -37,15 +37,13 @@ class Engine:
|
|||
'position': clip['in']
|
||||
}]
|
||||
for video_id in inpoints:
|
||||
for i, inpoint in sorted(
|
||||
for i, inpoint in enumerate(sorted(
|
||||
inpoints[video_id], key=lambda inpoint: inpoint['position']
|
||||
):
|
||||
)):
|
||||
if i < len(inpoints[video_id]) - 1:
|
||||
clips[inpoint['index']]['out'] = inpoints[video_id][i + 1]
|
||||
clips[inpoint['index']]['out'] = inpoints[video_id][i + 1]['position']
|
||||
else:
|
||||
clips[inpoint['index']]['out'] self.pandora.get({
|
||||
'id': id, keys: ['duration']
|
||||
})['duration']
|
||||
clips[inpoint['index']]['out'] = self.pandora.get(video_id, ['duration'])['duration']
|
||||
return clips
|
||||
|
||||
def _shift_clips(self, clips):
|
||||
|
|
Loading…
Reference in a new issue