From eed421041f83e2e17c5da46ab06963fdcafa982b Mon Sep 17 00:00:00 2001 From: DraftKinner <196864209+DraftKinner@users.noreply.github.com> Date: Tue, 25 Feb 2025 12:17:34 -0500 Subject: [PATCH] Use nargs for -d parameter --- zotify/__main__.py | 1 + zotify/app.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/zotify/__main__.py b/zotify/__main__.py index 1d0cb11..0e1d155 100644 --- a/zotify/__main__.py +++ b/zotify/__main__.py @@ -71,6 +71,7 @@ def main(): "-d", "--download", type=str, + nargs="*", help="Downloads tracks, playlists and albums from the URLs written in the file passed.", ) group.add_argument( diff --git a/zotify/app.py b/zotify/app.py index 613644c..aacc26d 100644 --- a/zotify/app.py +++ b/zotify/app.py @@ -211,7 +211,7 @@ class App: return selection.get("episodes") elif args.download: ids = [] - for x in args.download.split(", "): + for x in args.download: ids.extend(selection.from_file(x.strip())) return ids elif args.urls: