diff --git a/src/controller/mainController.py b/src/controller/mainController.py index 1e40cc1..be8bd2a 100644 --- a/src/controller/mainController.py +++ b/src/controller/mainController.py @@ -8,6 +8,7 @@ import logging import widgetUtils import utils import application +import config from pubsub import pub from wxUI import mainWindow, menus from update import updater @@ -206,6 +207,7 @@ class Controller(object): log.debug("Exiting...") self.timer.Stop() pub.unsubscribe(self.on_download_finished, "download_finished") + config.app.write() event.Skip() widgetUtils.exit_application() diff --git a/src/controller/player.py b/src/controller/player.py index 78f5b2f..28b8f48 100644 --- a/src/controller/player.py +++ b/src/controller/player.py @@ -4,6 +4,7 @@ import os import random import vlc import logging +import config from pubsub import pub from utils import call_threaded @@ -19,7 +20,7 @@ class audioPlayer(object): def __init__(self): self.is_playing = False - self.vol = 50 + self.vol = config.app["main"]["volume"] self.is_working = False self.queue = [] self.stopped = True @@ -94,6 +95,7 @@ class audioPlayer(object): @volume.setter def volume(self, vol): if vol <= 100 and vol >= 0: + config.app["main"]["volume"] = vol self.vol = vol self.player.audio_set_volume(self.vol)