mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-14 15:15:06 -04:00
Add scrape option
Signed-off-by: nathom <nathanthomas707@gmail.com>
This commit is contained in:
parent
e6dfc3f507
commit
5cd3913976
2 changed files with 12 additions and 0 deletions
|
@ -193,6 +193,9 @@ def search(ctx, **kwargs):
|
|||
|
||||
@cli.command()
|
||||
@click.option("-l", "--list", default="ideal-discography")
|
||||
@click.option(
|
||||
"-s", "--scrape", is_flag=True, help="Download all of the items in a list."
|
||||
)
|
||||
@click.pass_context
|
||||
def discover(ctx, **kwargs):
|
||||
"""Search for albums in Qobuz's featured lists.
|
||||
|
@ -228,6 +231,7 @@ def discover(ctx, **kwargs):
|
|||
* universal-jeunesse
|
||||
|
||||
* universal-chanson
|
||||
|
||||
"""
|
||||
from streamrip.constants import QOBUZ_FEATURED_KEYS
|
||||
|
||||
|
@ -235,6 +239,11 @@ def discover(ctx, **kwargs):
|
|||
kwargs["list"] in QOBUZ_FEATURED_KEYS
|
||||
), f"Invalid featured key {kwargs['list']}"
|
||||
|
||||
if kwargs["scrape"]:
|
||||
core.scrape(kwargs["list"])
|
||||
core.download()
|
||||
return
|
||||
|
||||
if core.interactive_search(kwargs["list"], "qobuz", "featured"):
|
||||
core.download()
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue