Class: Moc::Controller::Status::Live
- Inherits:
-
Object
- Object
- Moc::Controller::Status::Live
- Defined in:
- lib/LOLastfm/checkers/moc.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 34 35 36 |
# File 'lib/LOLastfm/checkers/moc.rb', line 14 def to_song return unless song file = song.file = song. if file.start_with?('http://') || file.start_with?('ftp://') comment = file else path = file end LOLastfm::Song.new(true, track: .track, title: .title, artist: .artist, album: .album, length: .time, comment: comment, path: path, stream: !!comment ) end |