mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-21 19:23:05 +00:00
Adding sleep to ensure AlertListener started OK.
This commit is contained in:
parent
97903cf189
commit
bee3f207eb
1 changed files with 2 additions and 1 deletions
|
@ -124,13 +124,14 @@ def create_section(server, section, opts):
|
|||
start = time.time()
|
||||
bar = tqdm(desc='Scanning section ' + section['name'], total=expected_media_count)
|
||||
notifier = server.startAlertListener(alert_callback)
|
||||
time.sleep(3)
|
||||
add_library_section(server, section)
|
||||
while bar.n < bar.total:
|
||||
if runtime >= 120:
|
||||
print('Metadata scan taking too long, but will continue anyway..')
|
||||
break
|
||||
time.sleep(3)
|
||||
runtime = time.time() - start
|
||||
runtime = int(time.time() - start)
|
||||
bar.close()
|
||||
notifier.stop()
|
||||
|
||||
|
|
Loading…
Reference in a new issue