mirror of
https://github.com/danbee/mpd-client
synced 2025-03-04 08:39:09 +00:00
Remove fake association style stuff
This commit is contained in:
parent
0bf3a50cb5
commit
717b2d1fb3
@ -2,7 +2,6 @@ module MPDClient
|
|||||||
class Album
|
class Album
|
||||||
|
|
||||||
include ClassToProc
|
include ClassToProc
|
||||||
include Enumerable
|
|
||||||
include Jsonable
|
include Jsonable
|
||||||
|
|
||||||
extend Forwardable
|
extend Forwardable
|
||||||
@ -10,12 +9,7 @@ module MPDClient
|
|||||||
delegate %i(artist genre) => :@first_song
|
delegate %i(artist genre) => :@first_song
|
||||||
|
|
||||||
def initialize(album)
|
def initialize(album)
|
||||||
@songs = MPDClient::Song.by(album: album)
|
@first_song = MPDClient::Song.by(album: album).first
|
||||||
@first_song = @songs.first
|
|
||||||
end
|
|
||||||
|
|
||||||
def each(&block)
|
|
||||||
@songs.each(&block)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def title
|
def title
|
||||||
@ -35,8 +29,7 @@ module MPDClient
|
|||||||
title: title,
|
title: title,
|
||||||
artist: artist,
|
artist: artist,
|
||||||
genre: genre,
|
genre: genre,
|
||||||
year: year,
|
year: year
|
||||||
songs: self.map(&:to_h)
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user