Is it possible to add a column for total track count in Discogs results?
I see another post indicating this info is not available in the initial search results and only when you choose a specific release, however it is from a few years back. Any chance this feature has been added to the Discogs API since? Thank you!
No, it is not returned on the Discogs search results.
Only when you view a release you get a track list -- not total number of tracks
`
"tracklist":[
{"position":"A1","type_":"track","title":"My Generation\t ","duration":""},{"position":"A2","type_":"track","title":"Anyway, Anyhow, Anywhere","duration":""},{"position":"A3","type_":"track","title":"The Kids Are Alright","duration":""},{"position":"A4","type_":"track","title":"Substitute\t","duration":""},{"position":"A5","type_":"track","title":"I'm A Boy","duration":""},{"position":"A6","type_":"track","title":"Happy Jack","duration":""},{"position":"A7","type_":"track","title":"Pictures Of Lily ","duration":""},{"position":"A8","type_":"track","title":"I Can See For Miles\t","duration":""},{"position":"A9","type_":"track","title":"Who Are You","duration":""},{"position":"B1","type_":"track","title":"Won't Get Fooled Again","duration":""},{"position":"B2","type_":"track","title":"Magic Bus","duration":""},{"position":"B3","type_":"track","title":"I Can't Explain\t","duration":""},{"position":"B4","type_":"track","title":"Pinball Wizard\t\t","duration":""},{"position":"B5","type_":"track","title":"I'm Free","duration":""},{"position":"B6","type_":"track","title":"See Me, Feel Me","duration":""},{"position":"B7","type_":"track","title":"Squeeze Box\t","duration":""},{"position":"B8","type_":"track","title":"Join Together","duration":""},{"position":"B9","type_":"track","title":"You Better, You Bet","duration":""}
]
`
I have not checked what programming language is actually used for mp3tag, but there may some kind of array_count one could use, to return this from the release information.
Did some testing -- FVI: first time ever with WebSource scripts
This would be nice to have in my opinion, but it's not doable as far as I can tell:
Still, I like having the number of tracks on a disc inserted to my tags.
FreeAC does this for me when I'm ripping CDs. It does count the tracks per disc and not per Album, of maybe 3 discs with 20 tracks each and that is howI like it!
Now, when playing with the Discogs API and the file (\Roaming\Mp3tag\data\sources\Discogs.inc) I have come to like what the Discogs API returns, the number of tracks per Album
With an added script-block some where under Album:
# ###################################################################
# A L B U M
# ###################################################################
…
### TrackTotal
outputto "DISCOGS_-TEST-_TRACKTOTAL"
json_foreach "tracklist"
sayrest
json_foreach_end
the Album result now shows (it matched all my test with multi disc sets, too):
In my setup I will allways use sub folders like Disc 1, Disc 2… and file names reflect that, too:
And with this I now have the total number of album tracks from Discogs and may notice a missing CD or missing files more easily in the log run.
Feel free to rename "outputto "DISCOGS_-TEST-_TRACKTOTAL" to your liking.
(I will not overwrite my existing TRACKTOTAL tag from FreeAC)
Let me know if I missed something.
Hope this helps.
I appreciate the time and thought you put into this, but it unfortunately would not help in my scenario. The problem is when there are multiple releases of the same album and I happen to have the one oddball, international release with 17 tracks, where as the rest are all 15 or 16 tracks and there are 50+ variants. If the track total for each release was shown in the initial search results and it could be sorted that way, it would save a lot of time. The MusicBrainz search offers this, but I've not used that service in a very long time because it always seemed less "official" than Discogs, but I guess it's worth another try. Thanks again!
Do these releases differ from each other only in the number of tracks? Or are there other differences like country, barcode and catalog number? These are shown in the discogs search result screen and could help to distinguish releases of the same album.


