Add artist_selection CLI option

This commit is contained in:
Rafael Moraes
2026-02-25 19:01:57 -03:00
parent 9e3f740eec
commit 87cf8c7789
2 changed files with 14 additions and 0 deletions
+1
View File
@@ -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:
+13
View File
@@ -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,