Class: MPD::Controller::Status
- Inherits:
-
Object
- Object
- MPD::Controller::Status
- Defined in:
- lib/LOLastfm/checkers/mpd.rb
Instance Method Summary collapse
Instance Method Details
#to_song ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/LOLastfm/checkers/mpd.rb', line 14 def to_song return unless song if song.file =~ %r{\w+://} comment = song.file else path = song.file end LOLastfm::Song.new(true, track: song.track, title: song.title, artist: song.artist, album: song.album, length: song.duration, comment: comment, path: path, stream: !!comment ) end |