2013-11-06 02:15:09 +00:00
|
|
|
# -*- encoding : utf-8 -*-
|
2012-10-12 12:45:51 +00:00
|
|
|
module MusicBrainz
|
2013-01-20 12:36:52 +00:00
|
|
|
class Track < BaseModel
|
2012-10-12 12:45:51 +00:00
|
|
|
field :position, Integer
|
|
|
|
field :recording_id, String
|
|
|
|
field :title, String
|
|
|
|
field :length, Integer
|
|
|
|
|
|
|
|
class << self
|
|
|
|
def find(id)
|
2013-01-20 12:36:52 +00:00
|
|
|
client.load(:recording, { id: id }, {
|
|
|
|
binding: :track,
|
|
|
|
create_model: :track
|
2012-10-12 12:45:51 +00:00
|
|
|
})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|