[modules/pulseaudio] Fix status extraction
With multiple devices, extracting mute status and volumes failed (because the loop would continue even after it found the correct device)
This commit is contained in:
parent
846d28714a
commit
a705adf207
1 changed files with 3 additions and 2 deletions
|
@ -87,13 +87,14 @@ class Module(bumblebee.engine.Module):
|
||||||
for line in result.split("\n"):
|
for line in result.split("\n"):
|
||||||
if device in line:
|
if device in line:
|
||||||
found = True
|
found = True
|
||||||
|
continue
|
||||||
if found == False:
|
if found == False:
|
||||||
continue
|
continue
|
||||||
for pattern in self._patterns:
|
for pattern in self._patterns:
|
||||||
if not pattern["expr"] in line:
|
if not pattern["expr"] in line:
|
||||||
continue
|
continue
|
||||||
if pattern["callback"](line) == False:
|
if pattern["callback"](line) == False and found == True:
|
||||||
break
|
return
|
||||||
|
|
||||||
def state(self, widget):
|
def state(self, widget):
|
||||||
if self._mute:
|
if self._mute:
|
||||||
|
|
Loading…
Reference in a new issue