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

track RealeaseDate #89

Open
ghost opened this issue Jan 26, 2020 · 5 comments
Open

track RealeaseDate #89

ghost opened this issue Jan 26, 2020 · 5 comments

Comments

@ghost
Copy link

ghost commented Jan 26, 2020

Good morning, sir,

There is a problem when retrieving the date when using the GetTracks() function which retrieves the tracklist via a playlist.

returned value = 01/01/2001

The problem does not exist with the GetTrackById() function.

Provisional repair :
Retrieve the track id via the playlist then go through a GetTrackById()

@projectgoav
Copy link
Owner

Is there a particular TrackID you are seeing this with or is it all tracks?

If you could let me know what version of E.Deezer you are using it would also be a big help.

@ghost
Copy link
Author

ghost commented Jan 27, 2020

No all tracks, I use last version

@projectgoav
Copy link
Owner

Unfortunately the Deezer API doesn't have the release date property in any of the returned JSON, either in Playlist/[ID] or Playlist/[ID]/tracks.

There's not really anything I can do here except for requesting Deezer change the API.

However, in the most recent changes in V5 (currently in alpha) the release date returns NULL in this case. It's a bit better than 01/01/2001 but still not ideal.

@ghost
Copy link
Author

ghost commented Feb 4, 2020

Hi,

Sorry for the late response...
The problem is the same for the search function...

It would be possible to use the Search.Track function and then search the data of each track one by one with a GetTrackByID in this same function?
Let's say that we add a true/false chosen by the user when calling the function to know if he wants only the basic data (not precise) or all the data with date etc...

For example:
I have a result of 5 tracks found in my search.
This one does not contain a valid date.

I chose to have a result with all the data so before returning the basic data it will replace the ITrackOld (without date) by a new ITrackNew with a call of the GetTrackByID() function.

I can't compile your project, I'm missing NET packages. Framework... but I have a 200 Kb/s connection when it works so I can't test it by myself....

I guess the track search is done in the SearchEndpoint.cs file and then calls the FindTracks() function.
If in this function before returning the value we redo a search of each track but all the values will be ?
Certainly a longer search but with the necessary data ^^^.

I don't know if you really understand what I'm trying to do, but I'll try on my own if I can compile...

Have a nice day!

@projectgoav
Copy link
Owner

I don't know if you really understand what I'm trying to do

As far as I understand, you are looking to get as much information as possible on tracks regardless how you obtain them (Album tracklist, playlist tracklist, artist top tracks, search results etc).

It would be possible to use the Search.Track function and then search the data of each track one by one with a GetTrackByID in this same function?

This is entirely possible as you should be able to loop through the tracks, grabbing their ID and using the GetById() function.

I'm a little hesitant to add this as an option to the library as I think this is something consumers will implement themsevles. A method on the ITrack interface to populate all the properties might be a suitable trade-off. I'll have a think about this.

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

1 participant