summaryrefslogtreecommitdiff
path: root/src/player.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2013-05-06 17:27:27 +0200
committerLars-Dominik Braun <lars@6xq.net>2013-05-13 19:21:58 +0200
commitbf6191b00825c4631312cf2446fd7b181abb7e1f (patch)
tree7bc8362eab926f8cd16a9398fb39efc3f31dbfa4 /src/player.c
parentea4324bbb6d3388c39f80906c85501feee3cb541 (diff)
downloadpianobar-bf6191b00825c4631312cf2446fd7b181abb7e1f.tar.gz
pianobar-bf6191b00825c4631312cf2446fd7b181abb7e1f.tar.bz2
pianobar-bf6191b00825c4631312cf2446fd7b181abb7e1f.zip
Permit multiple HTTP errors in a row
1) Make sure that multiple bad playlists in a row don’t result in a temporary ban 2) Ignore songs skipped because the playlist timed out after pausing for too long
Diffstat (limited to 'src/player.c')
-rw-r--r--src/player.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/player.c b/src/player.c
index 16c94dc..939b326 100644
--- a/src/player.c
+++ b/src/player.c
@@ -489,7 +489,7 @@ void *BarPlayerThread (void *data) {
default:
BarUiMsg (player->settings, MSG_ERR, "Unsupported audio format!\n");
- ret = (void *) PLAYER_RET_ERR;
+ ret = (void *) PLAYER_RET_HARDFAIL;
goto cleanup;
break;
}
@@ -528,15 +528,14 @@ void *BarPlayerThread (void *data) {
}
if (player->aoError) {
- ret = (void *) PLAYER_RET_ERR;
+ ret = (void *) PLAYER_RET_HARDFAIL;
}
/* Pandora sends broken audio url’s sometimes (“bad request”). ignore them. */
- if (wRet != WAITRESS_RET_OK && wRet != WAITRESS_RET_CB_ABORT &&
- wRet != WAITRESS_RET_BAD_REQUEST) {
+ if (wRet != WAITRESS_RET_OK && wRet != WAITRESS_RET_CB_ABORT) {
BarUiMsg (player->settings, MSG_ERR, "Cannot access audio file: %s\n",
WaitressErrorToStr (wRet));
- ret = (void *) PLAYER_RET_ERR;
+ ret = (void *) PLAYER_RET_SOFTFAIL;
}
cleanup: