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