Home | Trees | Index | Help |
---|
Package musicbrainz2 :: Module model :: Class Track |
|
object
--+ |Entity
--+ | Track
Represents a track.
This class represents a track which may appear on one or more releases. A track may be associated with exactly one artist (the main artist).
UsinggetReleases
, you can find out on which
releases this track appears. To get the track number, too, use the Release.getTracksOffset
method.
Note: Currently, the MusicBrainz server doesn't support tracks to be on more than one release.
Method Summary | |
---|---|
Constructor. | |
Add a PUID to this track. | |
Add a release on which this track appears. | |
Returns the main artist of this track. | |
Returns the duration of this track in milliseconds. | |
Returns the duration as a (minutes, seconds) tuple. | |
Returns the PUIDs associated with this track. | |
Returns the list of releases this track appears on. | |
Returns the track's title. | |
Sets this track's main artist. | |
Sets the duration of this track in milliseconds. | |
Sets the track's title. | |
Inherited from Entity | |
Adds a relation. | |
Returns a MusicBrainz ID. | |
Returns a list of relations. | |
Returns a list of target types available for this entity. | |
Sets a MusicBrainz ID. | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Property Summary | |
---|---|
artist : The track's main artist. | |
duration : The duration in milliseconds. | |
puids : The list of associated PUIDs. | |
releases : The releases on which this track appears. | |
title : The track's title. | |
Inherited from Entity | |
id : The MusicBrainz ID. |
Method Details |
---|
__init__(self,
id_=None,
title=None)
Constructor.
|
addPuid(self, puid)Add a PUID to this track.
|
addRelease(self, release)Add a release on which this track appears.
|
getArtist(self)Returns the main artist of this track.
|
getDuration(self)Returns the duration of this track in milliseconds.
|
getDurationSplit(self)Returns the duration as a (minutes, seconds) tuple. If no duration is set, (0, 0) is returned. Seconds are rounded towards the ceiling if at least 500 milliseconds are left.
|
getPuids(self)Returns the PUIDs associated with this track. Please note that a PUID may be associated with more than one track.
|
getReleases(self)Returns the list of releases this track appears on.
|
getTitle(self)Returns the track's title. The style and format of this attribute is specified by the style guide.
|
setArtist(self, artist)Sets this track's main artist.
|
setDuration(self, duration)Sets the duration of this track in milliseconds.
|
setTitle(self, title)Sets the track's title.
|
Property Details |
---|
artistThe track's main artist. |
durationThe duration in milliseconds.
|
puidsThe list of associated PUIDs.
|
releasesThe releases on which this track appears.
|
titleThe track's title. |
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Sat Aug 26 18:34:32 2006 | http://epydoc.sf.net |