archseer/ruby-mpd

track_length errors when a song has no time

Closed this issue · 0 comments

A Song may have @time==nil if the song is not valid. This may occur if a playlist has songs added to it that have then been removed from the queue (or if a playlist file is hand-edited to add broken entries).

When this is the case, asking for song.track_length errors, because the implementation is just @time.last.