wpctl: accept 0 as ID in clear-default subcommand
Currently it is not possible to clear the default Audio/Sink node with:
$ wpctl clear-default 0
Because ID 0
is not accepted. This MR solves the problem by treating clear-default IDs differently than the rest of the wpctl subcommands.
Unlike the rest of subcommands in wpctl, The ID for the clear-default subcommand must be a setting ID, not a pipewire Object ID. This means we cannot use the parse_id()
and translate_id()
helper functions because the setting ID 0
is acceptable, and the @DEFAULT_AUDIO_SINK@
, @DEFAULT_AUDIO_SOURCE@
and @DEFAULT_VIDEO_SOURCE@
strings are not acceptable.
Edited by Julian Bouzas