ruby-mpd icon indicating copy to clipboard operation
ruby-mpd copied to clipboard

Detect invalid songs

Open Phrogz opened this issue 10 years ago • 0 comments

  1. Create a playlist and add a song to it.
  2. Remove that song from the MPD library.
  3. Load the playlist.

The playlist now has a song with a file but no other data. How can I detect if this is a valid song with no metadata, or an invalid song?

I'm currently using the heuristic of checking to see if song.time.nil?. It would be nice to have something like MPD::Song#valid? to see if the song instance is grounded in reality and able to be used.

Phrogz avatar Jan 07 '16 18:01 Phrogz