Skip to content

Detect invalid songs #51

Description

@Phrogz
  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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions