Add find_by_discid method.
This commit is contained in:
parent
d66831ee8c
commit
2f2fe392d1
|
@ -10,7 +10,7 @@ module MusicBrainz
|
|||
field :asin, String
|
||||
field :barcode, String
|
||||
field :quality, String
|
||||
|
||||
|
||||
def tracks
|
||||
@tracks ||= client.load(:release, { id: id, inc: [:recordings, :media], limit: 100 }, {
|
||||
binding: :release_tracks,
|
||||
|
@ -26,6 +26,13 @@ module MusicBrainz
|
|||
create_model: :release
|
||||
})
|
||||
end
|
||||
|
||||
def find_by_discid(id)
|
||||
client.load(:discid, { id: id, inc: [:media, :release_groups] }, {
|
||||
binding: :release_group_releases,
|
||||
create_models: :release
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue