summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2012-09-14 21:38:33 +0200
committerLars-Dominik Braun <lars@6xq.net>2012-09-22 16:39:05 +0200
commit1c1628706034eac85b062a028bacc85bc18efc22 (patch)
tree77b748cce19e2741e3ddd9c763b60f73512709cb /src/main.c
parentfe1ffbd7257b4c0dd43a825912bcd65732df6db2 (diff)
downloadpianobar-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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index f011c5a..1d24167 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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);