fix(cli): restrict --limit option to download artist command

This commit is contained in:
Mathis Maquenne
2025-06-21 16:22:16 -04:00
parent 0680d8c8e7
commit 99bdc22a25
+1 -1
View File
@@ -71,7 +71,7 @@ func (c *Client) Run(ctx context.Context, opts Options, id string) error {
if len(songs) == 0 {
return fmt.Errorf("%s has no songs", c.resourceType)
}
if opts.Limit > 0 && len(songs) > opts.Limit {
if c.resourceType == "artist" && len(songs) > opts.Limit {
songs = songs[:opts.Limit]
resource.SetSongs(songs)
}