whatsnowplaying/whats-now-playing

MusicBrainz fallback may cause tight loop/appearance of crash

aw-was-here opened this issue · 1 comments

  1. TrackPoll requests for next track.
  2. Source input provides answer.
  3. Request for more metadata from the metadata processor
  4. Metadata processor calls MusicBrainz fallback
  5. Musicbrainz fallback doesn't get a qualifying answer and throws KeyError exception
  6. TrackPoll catches the exception, throws out the data, assuming it is incomplete/all bad.
  7. TrackPoll restarts loop to wait for the next track

From a user perspective, it appears the app has crashed because it doesn't think it has the next track. It hasn't, but it is definitely hard to break out of it until the next track is played.

Multiple fixes involved here, I think.

  1. MB fallback shouldn't throw the KeyError exception.
  2. The metadata processor should probably be the first line of defense if an exception is thrown.
  3. TrackPoll shouldn't just toss out the entire result if an exception is caught there; instead it should just continue on

4.0.5