-
Hi, How can i access values that are not predefined in the class Release? In the json result there are much more values then the Release class return. I read that not all values are mapped but how can i map them myself? some part returned from discogs json:
models.py:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
They are already mapped in discogs_client, you just need to dig one object level deeper. The tracklist is a list you can loop through. The track items you'll find there have the properties you are looking for. Have a look at our brand new documentation pages, PR is not through yet but they are accessible already. Here is exactly what you are looking for: https://python3-discogs-client.readthedocs.io/en/latest/fetching_data.html#release As said, docs are pretty new. Feedback and pointing to badly explained things is more than welcome. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hi, Thanks for your reply.
This is working.
I compared different json results and there is no consistence. 1 artist - song (orginal mix) a few json examples with cuts: example1:
example2:
example3:
example1:
example2:
example3:
As you can see sometimes there is duplicate info in the track title example; (Bass In Your Face (Space 92 Remix) so you get duplicate information. Sometimes they use extraartists for a remix. The json results look inconsistent. How can i generate a tracklist? |
Beta Was this translation helpful? Give feedback.
-
I did a quick test - added the mentioned releases to my collection, created a new mix named "Album Name" and added some of the tracks on those releases to it. This is how DiscoDOS would render it:
I am not sure what your goal is exactly. You said you want to create playlists of Albums - DiscoDOS is actually ment for creating playlists out of single tunes on any release - DJ playlists/mixes. If what you are after is lists containing exactly what is on one release this surely can be workarounded with the current version of the tool by creating a mix and then adding all the tracks of one album/release to it. If that's what you'd like to do regularly then a feature needs to be added that quickly adds whole releases to a mix/playlist. I sent you a PM on discogs.com - Since this gets out of scope of your question here, let's continue chatting as suggested in my PM. Also I'l mark your question here as anwered since your issue with finding details of tracks in tracklists is solved. You agree? |
Beta Was this translation helpful? Give feedback.
They are already mapped in discogs_client, you just need to dig one object level deeper. The tracklist is a list you can loop through. The track items you'll find there have the properties you are looking for.
Have a look at our brand new documentation pages, PR is not through yet but they are accessible already. Here is exactly what you are looking for: https://python3-discogs-client.readthedocs.io/en/latest/fetching_data.html#release
As said, docs are pretty new. Feedb…