There are computer programs that identify not only a piece of music, but a specific performance by a specific artist, on a specific recording – all by one minimal item of data – the length of the recorded track (not listening to the music at all). Gracenote is one example, I believe.
That is how the software worked that would identify CD’s, and add the titles, artist info, etc. for you. It was based on a database of the length of specific tracks on a recording. Sometimes a specific track would have the same length as others, but a whole album or CD of tracks would be unique enough to almost always identify the recording by checking the track lengths.