mirror of
https://github.com/danbee/mpd-client
synced 2025-03-04 08:39:09 +00:00
16 lines
304 B
Ruby
16 lines
304 B
Ruby
require './models/mpd_connection'
|
|
|
|
class Song < Struct.new(:artist, :album, :title)
|
|
|
|
def initialize(song)
|
|
@song = song
|
|
self.artist = song.artist
|
|
self.album = song.album
|
|
self.title = song.title
|
|
end
|
|
|
|
def self.queue
|
|
MPDConnection.mpd.queue.map { |song| self.new(song) }
|
|
end
|
|
end
|