1
0
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:
Dan Barber 2013-10-17 11:26:04 +01:00
parent a23319bf00
commit 1d11190c21

View File

@ -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