From 87cf8c7789a2e037a0a99ce0358665628fba56ec Mon Sep 17 00:00:00 2001 From: Rafael Moraes <50295204+glomatico@users.noreply.github.com> Date: Wed, 25 Feb 2026 19:01:57 -0300 Subject: [PATCH] Add artist_selection CLI option --- gamdl/cli/cli.py | 1 + gamdl/cli/cli_config.py | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/gamdl/cli/cli.py b/gamdl/cli/cli.py index fbf8790..36d8798 100644 --- a/gamdl/cli/cli.py +++ b/gamdl/cli/cli.py @@ -168,6 +168,7 @@ async def main(config: CliConfig): song_downloader=song_downloader, music_video_downloader=music_video_downloader, uploaded_video_downloader=uploaded_video_downloader, + artist_selection=config.artist_selection, ) if not config.synced_lyrics_only: diff --git a/gamdl/cli/cli_config.py b/gamdl/cli/cli_config.py index 78bbcb2..f4d095d 100644 --- a/gamdl/cli/cli_config.py +++ b/gamdl/cli/cli_config.py @@ -9,9 +9,11 @@ from dataclass_click import argument, option from ..api import AppleMusicApi from ..downloader import ( AppleMusicBaseDownloader, + AppleMusicDownloader, AppleMusicMusicVideoDownloader, AppleMusicSongDownloader, AppleMusicUploadedVideoDownloader, + ArtistDownloadSelection, DownloadMode, RemuxFormatMusicVideo, RemuxMode, @@ -35,6 +37,7 @@ song_downloader_sig = inspect.signature(AppleMusicSongDownloader.__init__) uploaded_video_downloader_sig = inspect.signature( AppleMusicUploadedVideoDownloader.__init__ ) +downloader_sig = inspect.signature(AppleMusicDownloader.__init__) @dataclass @@ -135,6 +138,16 @@ class CliConfig: default=api_sig.parameters["language"].default, ), ] + # Downloader specific options + artist_selection: Annotated[ + ArtistDownloadSelection | None, + option( + "--artist-selection", + help="Artist download selection", + default=downloader_sig.parameters["artist_selection"].default, + type=ArtistDownloadSelection, + ), + ] # Base Downloader specific options output_path: Annotated[ str,