Module: Quiyo::Database

Included in:
Quiyo
Defined in:
lib/quiyo/database.rb

Defined Under Namespace

Classes: Love

Instance Method Summary collapse

Instance Method Details

#loveObject



13
14
15
16
17
18
# File 'lib/quiyo/database.rb', line 13

def love
	@love = Love.create(
	                    :song     => @mpd.current_song["file"],
	                    :loved_at => Time.now
	                    )
end

#lovedObject



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/quiyo/database.rb', line 20

def loved
	Love.each { |s|
		song = @mpd.songs(s.song).first
		printf "[%s] %s : %s [%s]\n" % [
		                                s.id,
		                                colorize(song["artist"], CONF["colors"]["artist"]),
		                                colorize(song["title"],  CONF["colors"]["title"]),
		                                colorize(song["album"],  CONF["colors"]["album"])
		                               ]
	}
end