summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2018-10-15 11:21:59 +0200
committerLars-Dominik Braun <lars@6xq.net>2018-10-15 11:23:50 +0200
commitfb587856d3fb4fe5cbb4d24357030c023b425be9 (patch)
tree9b52081ce4fe086ba3b3e79e3d3a6a1c0c86e0c7 /src
parentd0cdce3646189775b3bd6f884669cad509201902 (diff)
downloadpianobar-fb587856d3fb4fe5cbb4d24357030c023b425be9.tar.gz
pianobar-fb587856d3fb4fe5cbb4d24357030c023b425be9.tar.bz2
pianobar-fb587856d3fb4fe5cbb4d24357030c023b425be9.zip
Increase max_retries default value
Back to default value before ff4f15214100d209f39e4ed85f47e572c8fe9289. It is used by the player as well and since 403’s are considered an “error” it must be larger than the number of files per playlist (4). See issue #672.
Diffstat (limited to 'src')
-rw-r--r--src/settings.c3
-rw-r--r--src/ui.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/settings.c b/src/settings.c
index 06ad818..72553e3 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -163,7 +163,8 @@ void BarSettingsRead (BarSettings_t *settings) {
settings->volume = 0;
settings->timeout = 30; /* seconds */
settings->gainMul = 1.0;
- settings->maxRetry = 3;
+ /* should be > 4, otherwise expired audio urls (403) can stop playback */
+ settings->maxRetry = 5;
settings->sortOrder = BAR_SORT_NAME_AZ;
settings->loveIcon = strdup (" <3");
settings->banIcon = strdup (" </3");
diff --git a/src/ui.c b/src/ui.c
index 689ad1e..6ccc2af 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -250,7 +250,7 @@ static CURLcode BarPianoHttpRequest (CURL * const http,
free (buffer.data);
buffer.data = NULL;
buffer.pos = 0;
- if (retry > settings->maxRetry) {
+ if (retry >= settings->maxRetry) {
break;
}
} else {