Fixes Issue #2 #4
@ -74,6 +74,8 @@ class Mediasite:
|
||||
# loop all slides and download, calculate the duration and create a text file holding all the info for he ffmpeg demuxer
|
||||
for i in range(num_slides):
|
||||
myslide['url'] = os.path.join(slides_path, self._download(slides_path, data['slides'][i]['url'], session))
|
||||
|
||||
# Handle the different edgecases for indiviual slide duration
|
||||
if i == num_slides - 1:
|
||||
myslide['duration'] = '{}ms'.format(data['duration'] - int(data['slides'][i]['duration']))
|
||||
elif i == 0:
|
||||
@ -81,6 +83,7 @@ class Mediasite:
|
||||
else:
|
||||
myslide['duration'] = '{}ms'.format(int(data['slides'][i+1]['duration']) - int(data['slides'][i]['duration']))
|
||||
|
||||
# Commit to the demuxfile
|
||||
f.write('file \'{}\'\n'.format(myslide['url']))
|
||||
f.write('duration {}\n'.format(myslide['duration']))
|
||||
slides.append(myslide)
|
||||
|
Loading…
x
Reference in New Issue
Block a user