Progressbar when searching folders for videos now uses correct length parameter and changed the label text.

This commit is contained in:
2018-09-16 16:48:43 +02:00
parent 5b71a8b94b
commit f62b834cf9

View File

@@ -113,7 +113,9 @@ def scan_videos(path):
raise ValueError('Path is not a directory')
# setup progress bar
with click.progressbar(length=len(os.listdir(path)), label='Searching for videos') as bar:
path_children = 0
for _ in os.walk(path): path_children += 1
with click.progressbar(length=path_children, label='Searching folders for videos') as bar:
# walk the path
videos = []