rosskouk / asknavidrome

An Alexa skill to allow streaming of music from Subsonic API compatible media servers on Amazon Echo devices.
https://rosskouk.github.io/asknavidrome
MIT License
48 stars 7 forks source link

Make Web Service More Resilient #1

Open rosskouk opened 1 year ago

rosskouk commented 1 year ago

When a problem track is encountered playback is stopped logs like below are generated:

2022-08-20 10:00:31,323 - werkzeug - INFO - 10.44.17.62 - - [20/Aug/2022 10:00:31] "POST / HTTP/1.1" 200 -
2022-08-20 10:01:09,321 - root - DEBUG - In PlaybackFailedHandler
2022-08-20 10:01:09,321 - root - ERROR - Playback Failed: {'message': 'Device playback error',  'object_type': 'MEDIA_ERROR_INTERNAL_DEVICE_ERROR'}
2022-08-20 10:01:09,322 - werkzeug - INFO - 10.44.17.62 - - [20/Aug/2022 10:01:09] "POST / HTTP/1.1" 200 -
2022-08-20 10:01:09,901 - root - DEBUG - In PlaybackStoppedHandler
2022-08-20 10:01:09,901 - root - DEBUG - Stored track offset of: 44628 ms for Set the Fire to the Third Bar
2022-08-20 10:01:09,901 - root - INFO - Playback stopped

Improve PlaybackFailedHandler by adding the following functionality: