diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2012-09-14 21:38:33 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2012-09-22 16:39:05 +0200 |
commit | 1c1628706034eac85b062a028bacc85bc18efc22 (patch) | |
tree | 77b748cce19e2741e3ddd9c763b60f73512709cb /src/main.c | |
parent | fe1ffbd7257b4c0dd43a825912bcd65732df6db2 (diff) | |
download | pianobar-1c1628706034eac85b062a028bacc85bc18efc22.tar.gz pianobar-1c1628706034eac85b062a028bacc85bc18efc22.tar.bz2 pianobar-1c1628706034eac85b062a028bacc85bc18efc22.zip |
Save station and volume to statefile
… and restore both on startup. To disable run `ln -sv /dev/null
~/.config/pianobar/state`. Setting an invalid autostart_station in the
config file prevents automatic station selection on startup.
Closes #305.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -402,6 +402,9 @@ int main (int argc, char **argv) { close (app.input.fds[1]); } + /* write statefile */ + BarSettingsWrite (app.curStation, &app.settings); + PianoDestroy (&app.ph); PianoDestroyPlaylist (app.songHistory); PianoDestroyPlaylist (app.playlist); |