Updated progressbars to have more info and changed from procent to absolut value when searching for videos.
This commit is contained in:
@@ -118,7 +118,7 @@ def scan_videos(path):
|
|||||||
# setup progress bar
|
# setup progress bar
|
||||||
path_children = 0
|
path_children = 0
|
||||||
for _ in os.walk(path): path_children += 1
|
for _ in os.walk(path): path_children += 1
|
||||||
with click.progressbar(length=path_children, label='Searching folders for videos') as bar:
|
with click.progressbar(length=path_children, show_pos=True, label='Searching folders for videos') as bar:
|
||||||
|
|
||||||
# walk the path
|
# walk the path
|
||||||
videos = []
|
videos = []
|
||||||
@@ -250,12 +250,11 @@ def scan_folder(path):
|
|||||||
try:
|
try:
|
||||||
scanned_videos = scan_videos(path)
|
scanned_videos = scan_videos(path)
|
||||||
except:
|
except:
|
||||||
print('Unexpected error while collecting directory path %s', path)
|
|
||||||
logging.exception('Unexpected error while collecting directory path %s', path)
|
logging.exception('Unexpected error while collecting directory path %s', path)
|
||||||
errored_paths.append(path)
|
errored_paths.append(path)
|
||||||
|
|
||||||
# Iterates over our scanned videos
|
# Iterates over our scanned videos
|
||||||
with click.progressbar(scanned_videos, label='Parsing found videos') as bar:
|
with click.progressbar(scanned_videos, label='Parsing videos') as bar:
|
||||||
for v in bar:
|
for v in bar:
|
||||||
v.subtitle_languages |= set(search_external_subtitles(v.name,
|
v.subtitle_languages |= set(search_external_subtitles(v.name,
|
||||||
directory=path).values())
|
directory=path).values())
|
||||||
|
|||||||
Reference in New Issue
Block a user