Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artist.get_albums_ep_singles() returns empty list #245

Open
exislow opened this issue Mar 22, 2024 · 6 comments
Open

Artist.get_albums_ep_singles() returns empty list #245

exislow opened this issue Mar 22, 2024 · 6 comments

Comments

@exislow
Copy link
Contributor

exislow commented Mar 22, 2024

Currently I try to get all albums of this artist https://tidal.com/browse/artist/3538682 (Blumentopf).

If I use Artist.get_albums() it returns only 4 albums (#Hmlr, 'B-Seiten und Raritäten', 'Gern geschehen', 'Großes Kino'), despite there are actually 11:

Screenshot 2024-03-22 um 17 21 58

If I use Artist.get_albums_ep_singles() the result is an empty list. Here I expect to retrieve all albums, EPs and singles. Would this actually even be possible with this filter? Seems like it would leave out the albums, wouldn't it?

params = {"filter": "EPSANDSINGLES", "limit": limit, "offset": offset}

What am I doing wrong?

@tehkillerbee
Copy link
Collaborator

tehkillerbee commented Mar 22, 2024

despite there are actually 11

That's odd, I would've expected the call to get_albums() to return all albums with no filtering. Have you noticed the pattern with any other artists?

get_albums_ep_singles()

Yes, this will only return EPs and singles as stated in the function description.

@exislow
Copy link
Contributor Author

exislow commented Mar 22, 2024

Wouldn't it make more sense, to name it like get_eps_singles()?

@tehkillerbee
Copy link
Collaborator

Wouldn't it make more sense, to name it like get_eps_singles()?

I see your point but since it does return album objects, I think this should still be reflected in the name. So I'd say the naming picked makes sense, although slightly confusing.

I'd be weary with changing the naming of it, in case any external libraries depend on it.

Still doesn't answer why you don't get all albums. If it is a bug, it must occur with other authors as well.

@exislow
Copy link
Contributor Author

exislow commented Mar 22, 2024

Wouldn't it make more sense, to name it like get_eps_singles()?

I see your point but since it does return album objects, I think this should still be reflected in the name. So I'd say the naming picked makes sense, although slightly confusing.

Usually one reflect this with types (typing). To reflect return types in the name declaration is usual, e.g. for C code but not for Python. In the end, you will decide, but my point is simply, that this is very confusing, since other names do not reflect the return type within this library.

I'd be weary with changing the naming of it, in case any external libraries depend on it.

This would not be the first time, that breaking changes occur. Just kidding :-) Do not get me serious on this.

Still doesn't answer why you don't get all albums. If it is a bug, it must occur with other authors as well.

I could not observe the same behavior with other artists, so far. Only tested it with 20 artists, yet. But what I can say is, that for some artists some albums are returned as duplicates (up to three times). Is this because of different sound qualities or something? Could you already observe such behavior?

@tehkillerbee
Copy link
Collaborator

tehkillerbee commented Mar 22, 2024

since other names do not reflect the return type within this library.

Yes, agreed. Perhaps it would be wise to look through tidalapi and check if there are any other functions with similar confusing / inconsistent names. Let's create a separate issue for these changes. Maybe other developers has opinions on this.

Do not get me serious on this.

Of course, I know what you mean... Of course breaking changes happen but I'd like to create the least inconvenience. 😂

But what I can say is, that for some artists some albums are returned as duplicates (up to three times). Is this because of different sound qualities or something?

Exactly, these are albums in various audio types (eg. SONY360). I noticed the same thing when browsing albums through mopidy. I'd like to make it easier to filter these albums.

Let's look out for other artists where similar issues occur. I'd like to see if we can find an example where the ep_singles actually return something.

@exislow
Copy link
Contributor Author

exislow commented Mar 23, 2024

I will keep my eyes open and report here, if I can find other examples of this behavior.

I have also created a new issue regarding the naming: #246

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants