Method: Play::Library.fs_get_artist_and_title_and_album

Defined in:
lib/play/library.rb

.fs_get_artist_and_title_and_album(path) ⇒ Object

Splits a music file up into three constituent parts: artist, title, album.

path - the String path to the music file on-disk

Returns an Array with three String elements: the artist, the song title, and the album.



65
66
67
68
69
70
71
72
# File 'lib/play/library.rb', line 65

def self.fs_get_artist_and_title_and_album(path)
  AudioInfo.open(path) do |info|
    return info.artist.try(:strip),
           info.title.try(:strip),
           info.album.try(:strip)
  end
rescue AudioInfoError
end