Module: Database
- Included in:
- Quiyo
- Defined in:
- lib/quiyo/database.rb
Defined Under Namespace
Classes: Love
Instance Method Summary collapse
Instance Method Details
#love ⇒ Object
}}}
12 13 14 15 16 17 |
# File 'lib/quiyo/database.rb', line 12 def love @love = Love.create( :song => @mpd.current_song["file"], :loved_at => Time.now ) end |
#loved ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/quiyo/database.rb', line 19 def loved Love.each { |s| song = @mpd.songs(s.song).first printf "[%s] %s : %s [%s]\n" % [ s.id, colorize(song["artist"], 99), colorize(song["title"], 202), colorize(song["album"], 107) ] } end |