implemented writing of list file

This commit is contained in:
Kjistóf 2017-01-15 20:59:53 +01:00
parent a62ca9d50c
commit d7a0be71fb
1 changed files with 4 additions and 3 deletions

View File

@ -54,10 +54,11 @@ print(videoLen)
longer = audioLen if audioLen > videoLen else videoLen
shorter = audioLen if audioLen < videoLen else videoLen
shorterFile = FILES[Stream.AUDIO] if audioLen < videoLen else FILES[Stream.VIDEO]
timesLoop = ceil(longer.seconds / shorter.seconds)
print('Longer: {}'.format(longer))
print('Shorter: {}'.format(shorter))
with open('list.txt', 'w') as f:
for i in range(timesLoop):
print(shorterFile, file=f)
print('Loop {} times.'.format(timesLoop))