It is time to dive into ISRC codes a bit more. If you don't know what these codes are, then it is probably good to read part 1 first.
In this article I will not really look at ISRC codes in Discogs (OK, just a tiny bit), but instead look at how to extract ISRC codes on a Linux machine using Python. For this I will use libdiscid and its Python bindings.
What you need for this:
It is literally as simple as this (Python 3 code, I stored it in a file called isrc.py):
And that will give me a nice list of ISRC codes per track, for example:
The CD in this case is from the 2017 reissue of Marillion's "Misplaced Childhood".
If the ISRC codes would have been stored per track in the Discogs database, instead of in the "Barcode and Other Identifiers" section per release this might have been easier.
How to solve this I don't know. I guess it is time to hit the Discogs forums again.
In this article I will not really look at ISRC codes in Discogs (OK, just a tiny bit), but instead look at how to extract ISRC codes on a Linux machine using Python. For this I will use libdiscid and its Python bindings.
What you need for this:
- a computer with a CD/DVD drive (which is getting surprisingly hard with laptops these days)
- a Linux distribution (in my case Fedora 27, but any recent Linux distribution will do)
- libdiscid with associated Python bindings (either Python 2 or Python 3)
It is literally as simple as this (Python 3 code, I stored it in a file called isrc.py):
import libdiscid disc = libdiscid.read() try: track_isrcs = disc.track_isrcs for i in range(0,len(track_isrcs)): print("Track %d: %s" % (i + 1, track_isrcs[i])) except: pass
And that will give me a nice list of ISRC codes per track, for example:
$ python3 isrc.py Track 1: GBAYE1601693 Track 2: GBAYE1601694 Track 3: GBAYE1601695 Track 4: GBAYE1601696 Track 5: GBAYE1601697 Track 6: GBAYE1601698 Track 7: GBAYE1601699 Track 8: GBAYE1601700 Track 9: GBAYE1601701 Track 10: GBAYE1601702
The CD in this case is from the 2017 reissue of Marillion's "Misplaced Childhood".
Storing ISRC codes in Discogs: challenges
If you look through the booklet of the CD that I scanned you will not find a single mention of any ISRC code. The codes really can only be found if you read the CD and search for the codes. Currently there is no way in Discogs to tag ISRC codes as "printed on release" or "extracted from release", which is a significant difference. It could for example happen that there is a release on a CD where both variants exist and then it matters.If the ISRC codes would have been stored per track in the Discogs database, instead of in the "Barcode and Other Identifiers" section per release this might have been easier.
How to solve this I don't know. I guess it is time to hit the Discogs forums again.
Comments
Post a Comment