Skip to content

Commit 3c5de9f

Browse files
committed
Update Setup Wizard to account for user possibly using mismatched watch history settings
1 parent 8eb4c23 commit 3c5de9f

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

resources/lib/youtube_plugin/youtube/helper/yt_setup_wizard.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -401,21 +401,23 @@ def process_refresh_settings(context, step, steps, **_kwargs):
401401

402402
def process_migrate_watch_history(context, step, steps, **_kwargs):
403403
localize = context.localize
404+
settings = context.get_settings()
404405
access_manager = context.get_access_manager()
405406
watch_history_id = access_manager.get_watch_history_id().upper()
406407

407408
step += 1
408-
if (watch_history_id != 'HL' and context.get_ui().on_yes_no_input(
409-
'{youtube} - {setup_wizard} ({step}/{steps})'.format(
410-
youtube=localize('youtube'),
411-
setup_wizard=localize('setup_wizard'),
412-
step=step,
413-
steps=steps,
414-
),
415-
localize('setup_wizard.prompt.migrate_watch_history'),
416-
)):
409+
if ((watch_history_id != 'HL' or not settings.use_remote_history())
410+
and context.get_ui().on_yes_no_input(
411+
'{youtube} - {setup_wizard} ({step}/{steps})'.format(
412+
youtube=localize('youtube'),
413+
setup_wizard=localize('setup_wizard'),
414+
step=step,
415+
steps=steps,
416+
),
417+
localize('setup_wizard.prompt.migrate_watch_history'),
418+
)):
417419
access_manager.set_watch_history_id('HL')
418-
context.get_settings().use_remote_history(True)
420+
settings.use_remote_history(True)
419421
return step
420422

421423

0 commit comments

Comments
 (0)