mirror of
https://github.com/danbee/mpd-client
synced 2025-03-04 08:39:09 +00:00
Add artist to album.
This commit is contained in:
parent
a23319bf00
commit
1d11190c21
@ -1,10 +1,11 @@
|
||||
require './models/mpd_connection'
|
||||
|
||||
class Album < Struct.new(:title, :genre, :year)
|
||||
class Album < Struct.new(:title, :artist, :genre, :year)
|
||||
|
||||
def initialize(album)
|
||||
first_song = MPDConnection.mpd.search(:album, album).first
|
||||
self.title = first_song.album
|
||||
self.artist = first_song.artist
|
||||
self.genre = first_song.genre
|
||||
self.year = first_song.date
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user