Send VolumeChanged right after NewSession (as it allows a client to show correct volume position immediately)

This commit is contained in:
norohind 2022-11-13 23:24:27 +03:00
parent 3be4be8ec7
commit f86b9e73ba
Signed by: norohind
GPG Key ID: 01C3BECC26FB59E1

View File

@ -103,8 +103,8 @@ class AudioController:
# Notifying
pid = new_session.ProcessId
self.outbound_q.put(Events.NewSession(pid))
self.outbound_q.put(Events.SetName(pid, get_app_name(new_session.Process)))
self.outbound_q.put(Events.VolumeChanged(pid, self.get_volume(pid)))
self.outbound_q.put(Events.SetName(pid, get_app_name(new_session.Process)))
self.outbound_q.put(Events.MuteStateChanged(pid, self.is_muted(pid)))
self.outbound_q.put(Events.StateChanged(pid, bool(self._sessions[pid].State)))