mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-06-18 18:48:23 +02:00
find-voice-call-profile: don't skip profiles with "unknown" availability
While testing this script I've found out that all profiles on my device have "unknown" availablility rather than "yes", so they were skipped. Fix by changing the check to not-"no". While here, add more debug logging that would've helped debug this, and fix the indentation on one line where it was off.
This commit is contained in:
parent
0e8a6706e6
commit
1282903e0d
1 changed files with 5 additions and 2 deletions
|
|
@ -61,10 +61,13 @@ SimpleEventHook {
|
|||
|
||||
for p in device:iterate_params ("EnumProfile") do
|
||||
local profile = cutils.parseParam (p, "EnumProfile")
|
||||
log:debug (device, string.format (
|
||||
"Checking profile '%s': available == %s, priority == %d",
|
||||
profile.name, profile.available, profile.priority))
|
||||
local found = string.find (profile.name, "^Voice Call")
|
||||
if profile.available == "yes" and found ~= nil then
|
||||
if profile.available ~= "no" and found ~= nil then
|
||||
if (not selected_profile) or selected_profile.priority < profile.priority then
|
||||
selected_profile = profile
|
||||
selected_profile = profile
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue