Python bindings for libdiscid
libdiscid is a library to calculate MusicBrainz Disc IDs. This module provides Python-bindings for libdiscid.
>>> disc = libdiscid.read()
>>> disc.id is not None
True
Reads the TOC from the device given as string.
If device is None, DEFAULT_DEVICE is used. features can be any combination of FEATURE_MCN and FEATURE_ISRC and FEATURE_READ. Note that prior to libdiscid version 0.5.0 features has no effect and that FEATURE_READ is always assumed, even if not given.
A libdiscid.DiscError exception is raised when reading fails, and NotImplementedError when libdiscid does not support reading discs on the current platform.
Creates a TOC based on the given offets.
Takes the first and last audio track, as well as the number of sectors and a list of offsets as in track_offsets.
If the operation fails for some reason, a libdiscid.DiscError exception is raised.
The default device on this platform.
The default device can change during the run-time of the program. This can happen with removable devices for example.
List of all available features supported by libdiscid on this platform.
Mapping between the constants representing a feature and their string representation.
Read the TOC of the disc to get the disc ID. This feature is always enabled.
Read the Media Catalogue Number of the disc.
Read International Standard Recording Codes of all the tracks.
The default device to use for DiscId.read() on this platform.
Deprecated since version 0.2.0: Please use default_device() instead.
Class to calculate MusicBrainz Disc IDs.
>>> d = DiscId()
>>> d.read()
>>> d.id is not None
True
Note that all the properties are only set after an successful call to DiscId.read() or DiscId.put().
The device the data was read from.
If it is None, libdiscid.put() was called to create the instance.
Number of the first audio track.
Number of the last audio track.
Leadout track.
Media Catalogue Number of the disc.
Pregap of the first track (in sectors).
Creates a TOC based on the given offets.
Takes the first and last audio track, as well as the number of sectors and a list of offsets as in DiscId.track_offsets.
If the operation fails for some reason, a libdiscid.DiscError exception is raised.
Reads the TOC from the device given as string.
If device is None, DEFAULT_DEVICE is used. features can be any combination of FEATURE_MCN and FEATURE_ISRC and FEATURE_READ. Note that prior to libdiscid version 0.5.0 features has no effect and that FEATURE_READ is always assumed, even if not given.
A libdiscid.DiscError exception is raised when reading fails, and NotImplementedError when libdiscid does not support reading discs on the current platform.
Total sector count.
Disc ID / TOC Submission URL for MusicBrainz
With this url you can submit the current TOC as a new MusicBrainz Disc ID.
Tuple of ISRCs of all tracks.
The first element of the list corresponds to the ISRC of the first_track and so on.
Tuple of all track lengths (in sectors).
The first element corresponds to the length of the track denoted by first_track and so on.
Tuple of all track offsets (in sectors).
The first element corresponds to the offset of the track denoted by first_track and so on.
The web service URL for info about the CD
With this url you can retrive information about the CD in XML from the MusicBrainz web service.
DiscId.read() and DiscId.put() will raise this exception when an error occurred.
Bases: object
Class to calculate MusicBrainz Disc IDs.
>>> d = DiscId()
>>> d.read()
>>> d.id is not None
True
Note that all the properties are only set after an successful call to DiscId.read() or DiscId.put().
The device the data was read from.
If it is None, libdiscid.put() was called to create the instance.
Number of the first audio track.
The FreeDB Disc ID (without category).
The MusicBrainz Disc ID.
Number of the last audio track.
Leadout track.
Media Catalogue Number of the disc.
Pregap of the first track (in sectors).
Creates a TOC based on the given offets.
Takes the first and last audio track, as well as the number of sectors and a list of offsets as in DiscId.track_offsets.
If the operation fails for some reason, a libdiscid.DiscError exception is raised.
Reads the TOC from the device given as string.
If device is None, DEFAULT_DEVICE is used. features can be any combination of FEATURE_MCN and FEATURE_ISRC and FEATURE_READ. Note that prior to libdiscid version 0.5.0 features has no effect and that FEATURE_READ is always assumed, even if not given.
A libdiscid.DiscError exception is raised when reading fails, and NotImplementedError when libdiscid does not support reading discs on the current platform.
Total sector count.
Disc ID / TOC Submission URL for MusicBrainz
With this url you can submit the current TOC as a new MusicBrainz Disc ID.
Tuple of ISRCs of all tracks.
The first element of the list corresponds to the ISRC of the first_track and so on.
Tuple of all track lengths (in sectors).
The first element corresponds to the length of the track denoted by first_track and so on.
Tuple of all track offsets (in sectors).
The first element corresponds to the offset of the track denoted by first_track and so on.
The web service URL for info about the CD
With this url you can retrive information about the CD in XML from the MusicBrainz web service.
Bases: exceptions.IOError
DiscId.read() and DiscId.put() will raise this exception when an error occurred.