Class | MusicBrainz::DiscID |
In: |
lib/mb-discid.rb
ext/mb_discid.c |
Parent: | Object |
Initialize the DiscID class and make it available in Ruby.
Return the number of the first track on this disc (usually 1).
Returns nil if no ID was yet read.
Returns the International Standard Recording Code (ISRC) for the track.
Requires libdiscid >= 0.3. If not supported this method will always return nil.
Returns always nil if no ID was yet read.
Return the number of the last track on this disc.
Returns nil if no ID was yet read.
Return the media catalogue number of the release, if present.
Requires libdiscid >= 0.3. If not supported this method will always return nil.
Returns nil if no ID was yet read.
Set the TOC information directly instead of reading it from a device.
Use this instead of read if the TOC information was already read elsewhere and you want to recalculate the ID. Throws an Exception if the CD‘s TOC can not be read.
Parameters:
Raises: | Exception |
Read the disc ID from the given device.
If no device is given the default device of the platform will be used. Throws an Exception if the CD‘s TOC can not be read.
Raises: | ArgumentError, TypeError, Exception |
Returns an array of TrackInfo objects. Each TrackInfo object contains detailed information about the track.
If a block is given this method returns nil and instead iterates over the block calling the block with one argument |track_info|.
Returns always nil if no ID was yet read. The block won‘t be called in this case.
Returns an array of [offset, length] tuples for each track.
Offset and length are both integer values representing sectors. If a block is given this method returns nil and instead iterates over the block calling the block with two arguments |offset, length|.
Returns always nil if no ID was yet read. The block won‘t be called in this case.
You may want to use the method track_details instead of this method to retrieve more detailed information about the tracks.
Return an URL for retrieving CD information from MusicBrainz’ web service
The URL provides the CD information in XML. See musicbrainz.org/development/mmd for details.
Returns nil if no ID was yet read.