mirror of
https://github.com/glomatico/gamdl.git
synced 2026-06-13 04:05:14 +03:00
Add artist_selection CLI option
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user