2011-04-05 01:44:42 +04:00
|
|
|
class Track < ActiveRecord::Base
|
|
|
|
set_table_name 'musicbrainz.bh_track'
|
2011-04-06 02:58:11 +04:00
|
|
|
belongs_to :release
|
2011-04-05 01:44:42 +04:00
|
|
|
|
2011-04-06 02:58:11 +04:00
|
|
|
def clearName
|
2011-04-05 01:44:42 +04:00
|
|
|
name.gsub('&', 'and').gsub(/[^a-z0-9]/, '').downcase
|
|
|
|
end
|
2011-04-07 06:50:02 +04:00
|
|
|
|
|
|
|
def files
|
|
|
|
TrackData(:id => id)
|
|
|
|
end
|
2011-04-05 01:44:42 +04:00
|
|
|
end
|