Class: MusicBrainz::Model::ReleaseGroup

Inherits:
Entity
  • Object
show all
Defined in:
lib/rbrainz/model/release_group.rb

Overview

A release group in the MusicBrainz DB.

A release group within MusicBrainz is an Entity which groups several different versions of releases (e.g. different editions of the same album).

See

wiki.musicbrainz.org/Release_Groups

Constant Summary collapse

TYPE_NONE =

A type for not a type. Currently unsupported by MusicBrainz

NS_MMD_1 + 'None'
TYPE_NON_ALBUM_TRACKS =

Special type for release groups that hold non-album track releases.

NS_MMD_1 + 'NonAlbum Track'
TYPE_ALBUM =

An album, perhaps better defined as a “Long Play” (LP) release, generally consists of previously unreleased material. This includes release re-issues, with or without bonus tracks.

NS_MMD_1 + 'Album'
TYPE_AUDIOBOOK =

An audiobook is a book read by a narrator without music.

NS_MMD_1 + 'Audiobook'
TYPE_COMPILATION =

A compilation is a collection of previously released tracks by one or more artists. Please note that this is a simplified description of a compilation.

NS_MMD_1 + 'Compilation'
TYPE_EP =

An EP is a so-called “Extended Play” release and often contains the letters EP in the title.

NS_MMD_1 + 'EP'
TYPE_INTERVIEW =

An interview release contains an interview, generally with an Artist.

NS_MMD_1 + 'Interview'
TYPE_LIVE =

A release that was recorded live.

NS_MMD_1 + 'Live'
TYPE_REMIX =

A release that primarily contains remixed material.

NS_MMD_1 + 'Remix'
TYPE_SINGLE =

A single typically has one main song and possibly a handful of additional tracks or remixes of the main track. A single is usually named after its main song.

NS_MMD_1 + 'Single'
TYPE_SOUNDTRACK =

A soundtrack is the musical score to a movie, TV series, stage show, computer game etc.

NS_MMD_1 + 'Soundtrack'
TYPE_SPOKENWORD =

Non-music spoken word releases.

NS_MMD_1 + 'Spokenword'
TYPE_OTHER =

Any release that does not fit or can’t decisively be placed in any of the categories above.

NS_MMD_1 + 'Other'
ENTITY_TYPE =

See Entity::ENTITY_TYPE.

:release_group

Instance Attribute Summary collapse

Attributes inherited from Entity

#id

Instance Method Summary collapse

Methods inherited from Entity

entity_type, #entity_type

Constructor Details

#initialize(id = nil, title = nil) ⇒ ReleaseGroup

Returns a new instance of ReleaseGroup.



80
81
82
83
84
85
# File 'lib/rbrainz/model/release_group.rb', line 80

def initialize(id=nil, title=nil)
  super id
  @title = title
  @releases = Collection.new
  @types = Array.new
end

Instance Attribute Details

#artistObject

The artist of this release group.



72
73
74
# File 'lib/rbrainz/model/release_group.rb', line 72

def artist
  @artist
end

#releasesObject (readonly)

A Collection of releases in this release group.



69
70
71
# File 'lib/rbrainz/model/release_group.rb', line 69

def releases
  @releases
end

#titleObject

The title of this release group.



66
67
68
# File 'lib/rbrainz/model/release_group.rb', line 66

def title
  @title
end

#typesObject (readonly)

The list of types for this release.

To test for release types, you can use the constants TYPE_ALBUM, TYPE_SINGLE, etc.



78
79
80
# File 'lib/rbrainz/model/release_group.rb', line 78

def types
  @types
end

Instance Method Details

#to_sObject

Returns the string representation for this release group.

Returns #title converted into a string.



90
91
92
# File 'lib/rbrainz/model/release_group.rb', line 90

def to_s
  title.to_s
end