Volume is saved in settings
This commit is contained in:
parent
9816cecf56
commit
febc63c547
@ -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()
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user