From 06192d9c879cf70171139597b8f722a41fb88a37 Mon Sep 17 00:00:00 2001 From: blmpl Date: Sat, 15 Oct 2016 10:10:52 +0200 Subject: Support binding to a specific network interface Closes #597. # Conflicts: # src/ui.c --- contrib/config-example | 1 + contrib/pianobar.1 | 11 +++++++++++ 2 files changed, 12 insertions(+) (limited to 'contrib') diff --git a/contrib/config-example b/contrib/config-example index 899ee39..070314b 100644 --- a/contrib/config-example +++ b/contrib/config-example @@ -10,6 +10,7 @@ # Proxy (for those who are not living in the USA) #control_proxy = http://127.0.0.1:9090/ +#bind_to = if!tun0 # Keybindings #act_help = ? diff --git a/contrib/pianobar.1 b/contrib/pianobar.1 index ee09c41..910af9a 100644 --- a/contrib/pianobar.1 +++ b/contrib/pianobar.1 @@ -209,6 +209,17 @@ required to validate Pandora’s SSL certificate. Non-american users need a proxy to use pandora.com. Only the xmlrpc interface will use this proxy. The music is streamed directly. +.TP +.B bind_to = {if!tunX,host!x.x.x.x,..} +This sets the interface name to use as outgoing network interface. The name can +be an interface name, an IP address, or a host name. (from CURLOPT_INTERFACE) + +It can be used as a replacement for +.B control_proxy +in conjunction with OpenVPN's +option +.B route-nopull. + .TP .B decrypt_password = R=U!LH$O2B# -- cgit v1.2.3 From c934c373e16acc7b7db6a374b1047649a0875dc3 Mon Sep 17 00:00:00 2001 From: Sean Greenslade Date: Tue, 14 Mar 2017 19:36:24 -0700 Subject: Added gain_mul setting to soften effect of replaygain. --- contrib/pianobar.1 | 6 ++++++ src/main.c | 3 ++- src/settings.c | 3 +++ src/settings.h | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/pianobar.1 b/contrib/pianobar.1 index 910af9a..0619735 100644 --- a/contrib/pianobar.1 +++ b/contrib/pianobar.1 @@ -366,6 +366,12 @@ Your pandora.com username. .B volume = 0 Initial volume correction in dB. Usually between -30 and +5. +.TP +.B gain_mul = 1.0 +Pandora sends a ReplayGain value with every song. This sets a multiplier so that the gain adjustment can be +reduced. 0.0 means no gain adjustment, 1.0 means full gain adjustment, values inbetween reduce the magnitude +of gain adjustment. + .SH REMOTE CONTROL .B pianobar can be controlled through a fifo. You have to create it yourself by executing diff --git a/src/main.c b/src/main.c index 3e6e85f..4f4214a 100644 --- a/src/main.c +++ b/src/main.c @@ -31,6 +31,7 @@ THE SOFTWARE. #include "ui.h" #include "ui_dispatch.h" #include "ui_readline.h" +#include "settings.h" /* authenticate user */ @@ -238,7 +239,7 @@ static void BarMainStartPlayback(BarApp_t *app) } else { - BarPlayer2SetGain(app->player, curSong->fileGain); + BarPlayer2SetGain(app->player, curSong->fileGain * app->settings.gainMul); BarPlayer2Open(app->player, curSong->audioUrl); /* throw event */ diff --git a/src/settings.c b/src/settings.c index b15053d..4f0ef8c 100644 --- a/src/settings.c +++ b/src/settings.c @@ -172,6 +172,7 @@ void BarSettingsRead (BarSettings_t *settings) { settings->autoselect = true; settings->history = 5; settings->volume = 0; + settings->gainMul = 1.0; settings->maxPlayerErrors = 5; settings->sortOrder = BAR_SORT_NAME_AZ; settings->loveIcon = strdup (" <3"); @@ -378,6 +379,8 @@ void BarSettingsRead (BarSettings_t *settings) { settings->atIcon = strdup (val); } else if (streq ("volume", key)) { settings->volume = atoi (val); + } else if (streq ("gain_mul", key)) { + settings->gainMul = (float)atof (val); } else if (streq ("format_nowplaying_song", key)) { free (settings->npSongFormat); settings->npSongFormat = strdup (val); diff --git a/src/settings.h b/src/settings.h index e6067f3..f8225ce 100644 --- a/src/settings.h +++ b/src/settings.h @@ -87,6 +87,7 @@ typedef struct { bool autoselect; unsigned int history, maxPlayerErrors; int volume; + float gainMul; BarStationSorting_t sortOrder; PianoAudioQuality_t audioQuality; char *username; -- cgit v1.2.3 From e23931a2509850686150ce12845c70be1cf3f735 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 17 Mar 2017 11:59:29 +0100 Subject: Sort manpage, remove non-existing tls_fingerprint --- contrib/config-example | 1 + contrib/pianobar.1 | 38 +++++++++++++++++--------------------- 2 files changed, 18 insertions(+), 21 deletions(-) (limited to 'contrib') diff --git a/contrib/config-example b/contrib/config-example index 070314b..0a69526 100644 --- a/contrib/config-example +++ b/contrib/config-example @@ -50,6 +50,7 @@ #ban_icon = [-] #volume = 0 #ca_bundle = /etc/ssl/certs/ca-certificates.crt +#gain_mul = 1.0 # Format strings #format_nowplaying_song = %t by %a on %l%r%@%s diff --git a/contrib/pianobar.1 b/contrib/pianobar.1 index 0619735..bf385f6 100644 --- a/contrib/pianobar.1 +++ b/contrib/pianobar.1 @@ -199,16 +199,6 @@ or the key you defined in .B ban_icon = Date: Wed, 26 Apr 2017 14:49:41 +0200 Subject: contrib: Use $XDG_HOME_CONFIG Fixes #618. --- contrib/eventcmd-examples/eventcmd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/eventcmd-examples/eventcmd.sh b/contrib/eventcmd-examples/eventcmd.sh index 7e2872a..f07cb7d 100755 --- a/contrib/eventcmd-examples/eventcmd.sh +++ b/contrib/eventcmd-examples/eventcmd.sh @@ -11,7 +11,7 @@ case "$1" in # songstart) # echo 'naughty.notify({title = "pianobar", text = "Now playing: ' "$title" ' by ' "$artist" '"})' | awesome-client - -# echo "$title -- $artist" > $HOME/.config/pianobar/nowplaying +# echo "$title -- $artist" > ${XDG_HOME_CONFIG:-${HOME}/.config}/pianobar/nowplaying # if [ "$rating" -eq 1 ] # then -- cgit v1.2.3 From aa2d42f83607d7eae63cc7d860b919e60e1defd8 Mon Sep 17 00:00:00 2001 From: Richard Hartmann Date: Wed, 26 Apr 2017 15:00:57 +0200 Subject: eventcmd.sh: Guard against spaces in path --- contrib/eventcmd-examples/eventcmd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/eventcmd-examples/eventcmd.sh b/contrib/eventcmd-examples/eventcmd.sh index f07cb7d..233b52e 100755 --- a/contrib/eventcmd-examples/eventcmd.sh +++ b/contrib/eventcmd-examples/eventcmd.sh @@ -11,7 +11,7 @@ case "$1" in # songstart) # echo 'naughty.notify({title = "pianobar", text = "Now playing: ' "$title" ' by ' "$artist" '"})' | awesome-client - -# echo "$title -- $artist" > ${XDG_HOME_CONFIG:-${HOME}/.config}/pianobar/nowplaying +# echo "$title -- $artist" > "${XDG_HOME_CONFIG:-${HOME}/.config}/pianobar/nowplaying" # if [ "$rating" -eq 1 ] # then -- cgit v1.2.3