diff options
author | Michał Cichoń <michcic@gmail.com> | 2018-10-30 13:12:47 +0100 |
---|---|---|
committer | Michał Cichoń <michcic@gmail.com> | 2018-10-30 13:12:47 +0100 |
commit | cb6789b17f81d29c6884c27715c705083e09a5db (patch) | |
tree | d6a47c38ff7dcb937992b15dc3c2d051bb877ac8 /src/settings.c | |
parent | cd5c65097ecf03480f477e47e0bb706dbf705a21 (diff) | |
parent | 82a13ad77bfcf2c6dc37fe0d1d55f93372db6509 (diff) | |
download | pianobar-windows-master.tar.gz pianobar-windows-master.tar.bz2 pianobar-windows-master.zip |
Merge branch 'release/2018.10.30'HEAD2018.10.30master
Diffstat (limited to 'src/settings.c')
-rw-r--r-- | src/settings.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/settings.c b/src/settings.c index 4f0ef8c..affb7f2 100644 --- a/src/settings.c +++ b/src/settings.c @@ -129,6 +129,7 @@ void BarSettingsDestroy (BarSettings_t *settings) { free (settings->eventCmd); free (settings->loveIcon); free (settings->banIcon); + free (settings->tiredIcon); free (settings->atIcon); free (settings->npSongFormat); free (settings->npStationFormat); @@ -172,11 +173,14 @@ void BarSettingsRead (BarSettings_t *settings) { settings->autoselect = true; settings->history = 5; settings->volume = 0; + settings->timeout = 30; /* seconds */ settings->gainMul = 1.0; - settings->maxPlayerErrors = 5; + /* 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"); + settings->tiredIcon = strdup (" zZ"); settings->atIcon = strdup (" @ "); settings->npSongFormat = strdup ("\"%t\" by \"%a\" on \"%l\"%r%@%s"); settings->npStationFormat = strdup ("Station \"%n\" (%i)"); @@ -351,8 +355,10 @@ void BarSettingsRead (BarSettings_t *settings) { settings->eventCmd = BarSettingsExpandTilde (val, userhome); } else if (streq ("history", key)) { settings->history = atoi (val); - } else if (streq ("max_player_errors", key)) { - settings->maxPlayerErrors = atoi (val); + } else if (streq ("max_retry", key)) { + settings->maxRetry = atoi (val); + } else if (streq ("timeout", key)) { + settings->timeout = atoi (val); } else if (streq ("sort", key)) { size_t i; static const char *mapping[] = {"name_az", @@ -374,6 +380,9 @@ void BarSettingsRead (BarSettings_t *settings) { } else if (streq ("ban_icon", key)) { free (settings->banIcon); settings->banIcon = strdup (val); + } else if (streq ("tired_icon", key)) { + free (settings->tiredIcon); + settings->tiredIcon = strdup (val); } else if (streq ("at_icon", key)) { free (settings->atIcon); settings->atIcon = strdup (val); |