Public Member Functions | |
| new () | |
| Constructor. | |
| MB_Track | getTracks (@filter) |
| Get tracks attached to this release. | |
Public Attributes | |
| id | |
| Unique ID to identify a single release. | |
| artist | |
The artist that the release belongs to. This matches artist.id. | |
| name | |
| Release name (title). | |
| gid | |
| GID, this field is a 36 digit (32 hexidecimal digits + 4 x '-') and is unique to every table. | |
| modpending | |
1 if there is an edit pending on this release, other wise 0 | |
| attributes | |
| Album attributes. | |
| page | |
| Page? | |
| language | |
| Language. | |
| script | |
| Script. | |
| modpending_lang | |
| ? | |
Class for holding release information.
| MB_Release::new | ( | ) |
| MB_Track MB_Release::getTracks | ( | @ | filter | ) |
Get tracks attached to this release.
use MB_MySQL;
$mb = MB_MySQL->new;
$mb->connect('root', 'pass');
$release = $mb->getRelease(id => 507231); @tracks = $release->getTracks();
foreach $track (@tracks) {
print $track->id . " " . $track->name . "\n";
}
Available filters:
limit - Eg. limit => 10
Unique ID to identify a single release.
The artist that the release belongs to. This matches artist.id.
Release name (title).
GID, this field is a 36 digit (32 hexidecimal digits + 4 x '-') and is unique to every table.
1 if there is an edit pending on this release, other wise 0
Album attributes.
Array of atrributes for a release. Contains information about the type and status of a release.
@attrs = $release->attributes;$attrs[0]: ?
$attrs[1]: Release type. See REL_TYPE
$attrs[2]: Release status. See REL_STATUS
Example:
if($release->attributes->[1] == $REL_TYPE{'EP'}) {
# is EP
}
Page?
Language.
Language. See ::languages
Script.
Script. See ::scripts
1.5.1-p1