[GH-ISSUE #1] getArtist Discography returns blank album info #1

Closed
opened 2026-02-28 14:19:25 +03:00 by kerem · 7 comments
Owner

Originally created by @ar3eh on GitHub (Dec 24, 2023).
Original GitHub issue: https://github.com/caiocinel/SpotifyPrivateAPI/issues/1

Getting all the artist information seems to work besides for when I try to get details of the discography.

Originally created by @ar3eh on GitHub (Dec 24, 2023). Original GitHub issue: https://github.com/caiocinel/SpotifyPrivateAPI/issues/1 Getting all the artist information seems to work besides for when I try to get details of the discography.
kerem closed this issue 2026-02-28 14:19:25 +03:00
Author
Owner

@caiocinel commented on GitHub (Dec 26, 2023):

Can you provide which id are you trying to get?

<!-- gh-comment-id:1869469053 --> @caiocinel commented on GitHub (Dec 26, 2023): Can you provide which id are you trying to get?
Author
Owner

@ar3eh commented on GitHub (Dec 26, 2023):

It doesn’t seem to work for with any ID.

Can you give me a snippet/id which works to test?

<!-- gh-comment-id:1869598311 --> @ar3eh commented on GitHub (Dec 26, 2023): It doesn’t seem to work for with any ID. Can you give me a snippet/id which works to test?
Author
Owner

@caiocinel commented on GitHub (Dec 26, 2023):

Spotify changed API structure, try latest version

<!-- gh-comment-id:1869621637 --> @caiocinel commented on GitHub (Dec 26, 2023): Spotify changed API structure, try latest version
Author
Owner

@ar3eh commented on GitHub (Dec 26, 2023):

Will do after work, thank you!

<!-- gh-comment-id:1869624868 --> @ar3eh commented on GitHub (Dec 26, 2023): Will do after work, thank you!
Author
Owner

@ar3eh commented on GitHub (Dec 27, 2023):

`var artist = await spotify.GetArtist("0NGAZxHanS9e0iNHpR8f2W");

    if(artist == null)
    {
        Console.WriteLine("Artist not found");
        return;
    }

    var items = artist.Data.ArtistUnion.Discography.Singles.Items;
    foreach (SpotifyPrivate.Artist.Item item in items)
    {
        Console.WriteLine(item.Name);
    }`

I'm getting blank returned for the "singles"

<!-- gh-comment-id:1869902956 --> @ar3eh commented on GitHub (Dec 27, 2023): `var artist = await spotify.GetArtist("0NGAZxHanS9e0iNHpR8f2W"); if(artist == null) { Console.WriteLine("Artist not found"); return; } var items = artist.Data.ArtistUnion.Discography.Singles.Items; foreach (SpotifyPrivate.Artist.Item item in items) { Console.WriteLine(item.Name); }` I'm getting blank returned for the "singles"
Author
Owner

@caiocinel commented on GitHub (Dec 27, 2023):

        for(int i = 0; i < artist.Data.ArtistUnion.Discography.Singles.Items.Count; i++)
        {
            Console.WriteLine("Single " + (i + 1) + ": " + artist.Data.ArtistUnion.Discography.Singles.Items[i].Releases.Items[0].Name);
        }

Try it

<!-- gh-comment-id:1870205813 --> @caiocinel commented on GitHub (Dec 27, 2023): ```c# for(int i = 0; i < artist.Data.ArtistUnion.Discography.Singles.Items.Count; i++) { Console.WriteLine("Single " + (i + 1) + ": " + artist.Data.ArtistUnion.Discography.Singles.Items[i].Releases.Items[0].Name); } ``` Try it
Author
Owner

@ar3eh commented on GitHub (Dec 27, 2023):

Works. Foreach wasn't. Thanks

<!-- gh-comment-id:1870282014 --> @ar3eh commented on GitHub (Dec 27, 2023): Works. Foreach wasn't. Thanks
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SpotifyPrivateAPI#1
No description provided.