Skip to content
This repository was archived by the owner on Feb 28, 2023. It is now read-only.
phwPublic archive

About

Rust bindings for MusicBrainz libdiscid

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Latest commit

 

History

91 Commits

Folders and files

Repository files navigation

Rust bindings for MusicBrainz libdiscid

crates.io Documentation License

This project has been moved to https://git.sr.ht/~phw/rust-discid

About

discid provides Rust 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.

Requirements

  • libdiscid >= 0.6.0

Usage

Read only the TOC

use discid::DiscId;

fn main() {
  // Specifying the device is optional. If set to `None` a platform
  // specific default will be used.
  let device = Some("/dev/cdrom");
  let disc = DiscId::read(device).expect("Reading disc failed");
  println!("ID: {}", disc.id());
}

Read the TOC and ISRCs

use discid::{DiscId, Features};