From 1d11190c21b933d3e94c7566939bd18ba756bbee Mon Sep 17 00:00:00 2001 From: Dan Barber Date: Thu, 17 Oct 2013 11:26:04 +0100 Subject: [PATCH] Add artist to album. --- models/album.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models/album.rb b/models/album.rb index d53dd10..681073a 100644 --- a/models/album.rb +++ b/models/album.rb @@ -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