core: Replace legacy INI config system with Pydantic-based TOML configuration.
This is a huge configuration refactoring. The configuration system now uses Pydantic settings, with better validation, better support for environment variables and other goodies. The main config files now use TOML instead of INI, this allow for better handling of complex types, notably dict. Plugins, components and frontends can declare their config settings in a class which will be imported dynamically.
This commit is contained in:
parent
f3f40848b3
commit
6a7b7bc36a
1 changed files with 1392 additions and 1011 deletions
|
|
@ -1,5 +1,3 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
# SAT plugin for file tansfer
|
||||
# Copyright (C) 2009-2021 Jérôme Poisson (goffi@goffi.org)
|
||||
|
||||
|
|
@ -30,6 +28,7 @@ from twisted.internet import protocol
|
|||
from twisted.internet import abstract
|
||||
from twisted.internet import error as int_error
|
||||
from twisted.internet import _sslverify
|
||||
from libervia.backend import G
|
||||
from libervia.backend.core.i18n import _, D_
|
||||
from libervia.backend.core.constants import Const as C
|
||||
from libervia.backend.core.log import getLogger
|
||||
|
|
@ -284,7 +283,7 @@ class AndroidPlugin(object):
|
|||
self.am = activity.getSystemService(Context.AUDIO_SERVICE)
|
||||
|
||||
# sound notification
|
||||
media_dir = Path(host.memory.config_get("", "media_dir"))
|
||||
media_dir = G.config.common.media_dir
|
||||
assert media_dir is not None
|
||||
notif_path = media_dir / "sounds" / "notifications" / "music-box.mp3"
|
||||
self.notif_player = MediaPlayer()
|
||||
|
|
|
|||
Loading…
Reference in a new issue