mirror of
https://github.com/pkkid/python-plexapi
synced 2025-02-16 21:08:27 +00:00
Fix arguments
This commit is contained in:
parent
58fabe97d8
commit
a6fcb21c12
1 changed files with 4 additions and 4 deletions
|
@ -72,13 +72,13 @@ def get_tvshow_path(name, season, episode):
|
||||||
return os.path.join(tvshows_path, name, 'S%02dE%02d.mp4' % (season, episode))
|
return os.path.join(tvshows_path, name, 'S%02dE%02d.mp4' % (season, episode))
|
||||||
|
|
||||||
|
|
||||||
def add_library_section(server, section, opts):
|
def add_library_section(server, section):
|
||||||
""" Add the specified section to our Plex instance. This tends to be a bit
|
""" Add the specified section to our Plex instance. This tends to be a bit
|
||||||
flaky, so we retry a few times here.
|
flaky, so we retry a few times here.
|
||||||
"""
|
"""
|
||||||
start = time.time()
|
start = time.time()
|
||||||
runtime = 0
|
runtime = 0
|
||||||
while runtime < opts.bootstrap_timeout:
|
while runtime < 60:
|
||||||
try:
|
try:
|
||||||
server.library.add(**section)
|
server.library.add(**section)
|
||||||
return True
|
return True
|
||||||
|
@ -127,7 +127,7 @@ def create_section(server, section, opts):
|
||||||
start = time.time()
|
start = time.time()
|
||||||
bar = tqdm(desc='Scanning section ' + section['name'], total=expected_media_count)
|
bar = tqdm(desc='Scanning section ' + section['name'], total=expected_media_count)
|
||||||
notifier = server.startAlertListener(alert_callback)
|
notifier = server.startAlertListener(alert_callback)
|
||||||
add_library_section(server, section, opts)
|
add_library_section(server, section)
|
||||||
while bar.n < bar.total:
|
while bar.n < bar.total:
|
||||||
if runtime >= opts.bootstrap_timeout:
|
if runtime >= opts.bootstrap_timeout:
|
||||||
print('Metadata scan taking too long, probably something went really wrong')
|
print('Metadata scan taking too long, probably something went really wrong')
|
||||||
|
@ -325,7 +325,7 @@ if __name__ == '__main__':
|
||||||
if sections:
|
if sections:
|
||||||
print('Creating the Plex libraries in our instance')
|
print('Creating the Plex libraries in our instance')
|
||||||
for section in sections:
|
for section in sections:
|
||||||
create_section(server, section)
|
create_section(server, section, opts)
|
||||||
|
|
||||||
# Share this instance with the specified username
|
# Share this instance with the specified username
|
||||||
if account:
|
if account:
|
||||||
|
|
Loading…
Add table
Reference in a new issue