spotDL / spotify-downloader

Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found).
https://spotdl.readthedocs.io/en/latest/
MIT License
17.32k stars 1.6k forks source link

[Q] How do I download all singles of an artist? #2046

Closed NightMachinery closed 6 months ago

NightMachinery commented 7 months ago

Requested Feature

How do I download all singles of an artist?

Possible implementation

_

jnxr commented 7 months ago

Download all songs by the artist, using the spotify artist link, and then separate out the singles from the folder. eg: spotdl https://open.spotify.com/artist/6RQZSQjI4u2t4TwzpyE821

egndz commented 7 months ago

When we get the metadata from the Artist, we have the album_type field which can be used to filter out the songs. I will implement it in the following week. We can pass the --album-type through CLI for that. Example output from the Artist metadata:

{'href': 'https://api.spotify.com/v1/artists/6RQZSQjI4u2t4TwzpyE821/albums?include_groups=album,single&offset=0&limit=20', 'items': [{'album_group': 'single', 'album_type': 'single', 'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/6RQZSQjI4u2t4TwzpyE821'}, 'href': 'https://api.spotify.com/v1/artists/6RQZSQjI4u2t4TwzpyE821', 'id': '6RQZSQjI4u2t4TwzpyE821', 'name': 'Emily Underhill', 'type': 'artist', 'uri': 'spotify:artist:6RQZSQjI4u2t4TwzpyE821'}], 'available_markets': ['AR', 'AU', 'AT', 'BE', 'BO', 'BR', 'BG', 'CA', 'CL', 'CO', 'CR', 'CY', 'CZ', 'DK', 'DO', 'DE', 'EC', 'EE', 'SV', 'FI', 'FR', 'GR', 'GT', 'HN', 'HK', 'HU', 'IS', 'IE', 'IT', 'LV', 'LT', 'LU', 'MY', 'MT', 'MX', 'NL', 'NZ', 'NI', 'NO', 'PA', 'PY', 'PE', 'PH', 'PL', 'PT', 'SG', 'SK', 'ES', 'SE', 'CH', 'TW', 'TR', 'UY', 'US', 'GB', 'AD', 'LI', 'MC', 'ID', 'JP', 'TH', 'VN', 'RO', 'IL', 'ZA', 'SA', 'AE', 'BH', 'QA', 'OM', 'KW', 'EG', 'MA', 'DZ', 'TN', 'LB', 'JO', 'PS', 'IN', 'BY', 'KZ', 'MD', 'UA', 'AL', 'BA', 'HR', 'ME', 'MK', 'RS', 'SI', 'KR', 'BD', 'PK', 'LK', 'GH', 'KE', 'NG', 'TZ', 'UG', 'AG', 'AM', 'BS', 'BB', 'BZ', 'BT', 'BW', 'BF', 'CV', 'CW', 'DM', 'FJ', 'GM', 'GE', 'GD', 'GW', 'GY', 'HT', 'JM', 'KI', 'LS', 'LR', 'MW', 'MV', 'ML', 'MH', 'FM', 'NA', 'NR', 'NE', 'PW', 'PG', 'WS', 'SM', 'ST', 'SN', 'SC', 'SL', 'SB', 'KN', 'LC', 'VC', 'SR', 'TL', 'TO', 'TT', 'TV', 'VU', 'AZ', 'BN', 'BI', 'KH', 'CM', 'TD', 'KM', 'GQ', 'SZ', 'GA', 'GN', 'KG', 'LA', 'MO', 'MR', 'MN', 'NP', 'RW', 'TG', 'UZ', 'ZW', 'BJ', 'MG', 'MU', 'MZ', 'AO', 'CI', 'DJ', 'ZM', 'CD', 'CG', 'IQ', 'LY', 'TJ', 'VE', 'ET', 'XK'], 'external_urls': {'spotify': 'https://open.spotify.com/album/1RM2hD3p5dzcdakugcpG3M'}, 'href': 'https://api.spotify.com/v1/albums/1RM2hD3p5dzcdakugcpG3M', 'id': '1RM2hD3p5dzcdakugcpG3M', 'images': [{'height': 640, 'url': 'https://i.scdn.co/image/ab67616d0000b273004550ff3aad5379cf8a2822', 'width': 640}, {'height': 300, 'url': 'https://i.scdn.co/image/ab67616d00001e02004550ff3aad5379cf8a2822', 'width': 300}, {'height': 64, 'url': 'https://i.scdn.co/image/ab67616d00004851004550ff3aad5379cf8a2822', 'width': 64}], 'name': "Lost in Me (Splinter's eMotion Picture Remix)", 'release_date': '2012-04-16', 'release_date_precision': 'day', 'total_tracks': 1, 'type': 'album', 'uri': 'spotify:album:1RM2hD3p5dzcdakugcpG3M'}], 'limit': 20, 'next': None, 'offset': 0, 'previous': None, 'total': 1}

@NightMachinery @jnxr

egndz commented 7 months ago

2048 here you go, that will give you option to get the only singles or albums of your best artist ❤️

xnetcat commented 6 months ago

merged