settings.py: support ~ expansion for sound path
This commit is contained in:
		| @@ -592,6 +592,7 @@ class Backend: | |||||||
|  |  | ||||||
|     async def sound_notify(self) -> None: |     async def sound_notify(self) -> None: | ||||||
|         path = self.settings.Notifications.default_sound |         path = self.settings.Notifications.default_sound | ||||||
|  |         path = str(Path(path).expanduser()) | ||||||
|  |  | ||||||
|         if path == "default.wav": |         if path == "default.wav": | ||||||
|             path = "src/sounds/default.wav" |             path = "src/sounds/default.wav" | ||||||
|   | |||||||
| @@ -58,7 +58,7 @@ class Notifications: | |||||||
|  |  | ||||||
|     # Default sound to play for notifications. Can be the filename |     # Default sound to play for notifications. Can be the filename | ||||||
|     # of a builtin sound (only "default.wav" currently exists), or the |     # of a builtin sound (only "default.wav" currently exists), or the | ||||||
|     # absolute path to a WAV file. |     # absolute path to a WAV file (supports ~ user expansion). | ||||||
|     default_sound: str = "default.wav" |     default_sound: str = "default.wav" | ||||||
|  |  | ||||||
|     # How long in seconds the window will flash in your dock or taskbar when |     # How long in seconds the window will flash in your dock or taskbar when | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	