Class MusicBrainz::Model::Disc
In: lib/rbrainz/model/disc.rb
Parent: Object

Represents an audio CD.

A disc has a disc ID, which is calculated from the CD‘s table of contents (TOC). It also can include the numbers of sectors on the CD.

The disc id is mainly used to lookup a release in the MusicBrainz database the matches a given disc id. See Webservice::ReleaseFilter for details on this.

If you need to calculate disc IDs you should install the mb-discid package. It allows you to calculate the disc ID for an audio CD.

Example:

 require 'rbrainz'
 require 'mb-discid'

 discid = MusicBrainz::DiscID.new
 discid.read

 disc = MusicBrainz::Model::Disc.new
 disc.id = discid
See:wiki.musicbrainz.org/DiscID for more information about MusicBrainz disc IDs.
See:rbrainz.rubyforge.org/mbdiscid/api/

Methods

id=   new   to_s  

Attributes

id  [R]  The MusicBrainz DiscID. A string containing a 28-character DiscID.
sectors  [RW]  Number of sectors on the disc

Public Class methods

Public Instance methods

Set the MusicBrainz disc ID for this disc.

The disc_id argument can be a string or a MusicBrainz::DiscID object.

Convert the Disc into a string.

Returns id converted into a string.

[Validate]