From 1c1628706034eac85b062a028bacc85bc18efc22 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 14 Sep 2012 21:38:33 +0200 Subject: Save station and volume to statefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … 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. --- src/main.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main.c') 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); -- cgit v1.2.3