Volume should be saved across restarts
This commit is contained in:
parent
91317b7a41
commit
8422243465
@ -1,6 +1,11 @@
|
||||
[app-settings]
|
||||
username = string(default="")
|
||||
password = string(default="")
|
||||
language = string(default="system")
|
||||
use_proxy = boolean(default=False)
|
||||
first_start = boolean(default=True)
|
||||
first_start = boolean(default=True)
|
||||
|
||||
[sound]
|
||||
volume = integer(default=100)
|
||||
input_device = string(default="Default")
|
||||
output_device = string(default="Default")
|
||||
session_mute = boolean(default=False)
|
||||
current_soundpack = string(default="default")
|
@ -9,6 +9,7 @@ import output
|
||||
import presenters
|
||||
import interactors
|
||||
import views
|
||||
import config
|
||||
from vk_api.exceptions import LoginRequired, VkApiError
|
||||
from requests.exceptions import ConnectionError
|
||||
from pubsub import pub
|
||||
@ -235,6 +236,9 @@ class Controller(object):
|
||||
log.debug("Receibed an exit signal. closing...")
|
||||
self.set_offline()
|
||||
self.disconnect_events()
|
||||
volume = player.player.volume
|
||||
config.app["sound"]["volume"] = volume
|
||||
config.app.write()
|
||||
self.window.Destroy()
|
||||
wx.GetApp().ExitMainLoop()
|
||||
|
||||
|
@ -24,7 +24,7 @@ class audioPlayer(object):
|
||||
def __init__(self):
|
||||
self.is_playing = False
|
||||
self.stream = None
|
||||
self.vol = 100
|
||||
self.vol = config.app["sound"]["volume"]
|
||||
self.is_working = False
|
||||
self.queue = []
|
||||
self.playing_track = 0
|
||||
|
@ -17,13 +17,6 @@ count_for_wall_buffers = integer(default=100)
|
||||
count_for_video_buffers = integer(default=200)
|
||||
count_for_audio_buffers = integer(default=1000)
|
||||
|
||||
[sound]
|
||||
volume = float(default=1.0)
|
||||
input_device = string(default="Default")
|
||||
output_device = string(default="Default")
|
||||
session_mute = boolean(default=False)
|
||||
current_soundpack = string(default="default")
|
||||
|
||||
[chat]
|
||||
notify_online = boolean(default=True)
|
||||
notify_offline = boolean(default=True)
|
||||
|
Loading…
Reference in New Issue
Block a user