From 05235b7080af61807b0ba0890096869f24509e8d Mon Sep 17 00:00:00 2001 From: nathom Date: Sun, 11 Jul 2021 11:31:49 -0700 Subject: [PATCH] Add option to specify number of search results Signed-off-by: nathom --- rip/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rip/cli.py b/rip/cli.py index 9c1e19f..1d8f1a0 100644 --- a/rip/cli.py +++ b/rip/cli.py @@ -196,6 +196,7 @@ def search(ctx, **kwargs): @click.option( "-s", "--scrape", is_flag=True, help="Download all of the items in a list." ) +@click.option("-n", "--num-items", default=50, help="Number of items to parse.") @click.pass_context def discover(ctx, **kwargs): """Search for albums in Qobuz's featured lists. @@ -244,7 +245,9 @@ def discover(ctx, **kwargs): core.download() return - if core.interactive_search(kwargs["list"], "qobuz", "featured"): + if core.interactive_search( + kwargs["list"], "qobuz", "featured", limit=int(kwargs["num_items"]) + ): core.download() else: none_chosen()