This project has been moved to https://git.sr.ht/~phw/go-discid
discid provides Go bindings for the MusicBrainz DiscID library libdiscid. It allows calculating DiscIDs (MusicBrainz and freedb) for Audio CDs. Additionally the library can extract the MCN/UPC/EAN and the ISRCs from disc.
- libdiscid >= 0.6.0
package main
import (
"fmt"
"log"
"go.uploadedlobster.com/discid"
)
func main() {
// Specifying the device is optional. If set to an empty string a platform
// specific default will be used.
disc, err := discid.ReadFeatures("", discid.FeatureRead|discid.FeatureMcn)
if err != nil {
log.Fatal(err)
}
defer disc.Close()
fmt.Printf("Disc ID: %v\n", disc.Id())
fmt.Printf("MCN : %v\n", disc.Mcn())
}
See the API documentation for details.
The source code for discid-sys is available on SourceHut.
Please report any issues on the issue tracker.
Patches can be submitted to the mailing list. You can clone the repository directly on SourceHut and submit your changes with the "Prepare patchset" button. Please see SourceHut's documentation for sending patches upstream for details.
discid Copyright (c) 2020-2023 by Philipp Wolfer [email protected]
discid is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
See LICENSE for details.