diff --git a/coub-dl.py b/coub-dl.py index ca762fa..85e01af 100644 --- a/coub-dl.py +++ b/coub-dl.py @@ -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))