busty icon indicating copy to clipboard operation
busty copied to clipboard

More gracefully handle an exception raised during playback

Open anoadragon453 opened this issue 2 years ago • 1 comments

Currently if a song fails midway through playback, we'll just log an exception and carry on to the next song.

https://github.com/anoadragon453/busty/blob/012b6d257e722e6487ad727a25208b8772a3eb02/main.py#L556-L558

I think we could handle this in a slightly better way. Namely:

  • Try replaying the song (though be careful of falling into an infinite loop).
  • Send a message in the room that playback failed, rather than having no feedback on Discord. Otherwise everyone but the author will just think that the song simply ended abruptly.

anoadragon453 avatar Jul 03 '22 16:07 anoadragon453

If there's a failure partway through I'm more inclined to believe it's an issue with the file than with some external factor which could be fixed by restarting playback. Sending a message in the room sounds like a good idea.

Cephian avatar Jul 03 '22 19:07 Cephian