Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions not working when prio=-1 #5

Closed
BanditSan opened this issue Sep 2, 2021 · 7 comments
Closed

Functions not working when prio=-1 #5

BanditSan opened this issue Sep 2, 2021 · 7 comments

Comments

@BanditSan
Copy link

EasyEffects sets Sinks prio=-1

$ pw-cat --playback --list-targets
Available targets ("*" denotes default): 
*	41: description="HyperX 7.1 Audio Analog Stereo" prio=945
	165: description="EasyEffects Sink" prio=-1

all functions not working while easyeffects is enabled with error:

>>> Controller().get_versiom()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "~/.local/lib/python3.9/site-packages/pipewire_python/controller.py", line 126, in __init__
    self.load_list_targets(mode="playback", verbose=verbose)
  File "~/.local/lib/python3.9/site-packages/pipewire_python/controller.py", line 423, in load_list_targets
    self._pipewire_list_targets["list_playblack"] = _generate_dict_list_targets(
  File "~/.local/lib/python3.9/site-packages/pipewire_python/_utils.py", line 189, in _generate_dict_list_targets
    "prior": results_regex_prio[idx],
IndexError: list index out of range

without easyeefects all works fine

>>> Controller().get_list_targets()
{'list_playblack': {'41': {'description': 'HyperX 7.1 Audio Analog Stereo', 'prior': '945'}, '_list_nodes': ['41'], '_node_default': ['41'], '_alsa_node': []}, 'list_record': {'42': {'description': 'HyperX 7.1 Audio Analog Stereo', 'prior': '1945'}, '_list_nodes': ['42'], '_node_default': ['42'], '_alsa_node': []}}
@pablodz
Copy link
Owner

pablodz commented Sep 2, 2021

I'll check the commands due pipewire_python is handling commands with the shell output

@BanditSan
Copy link
Author

Looked bit at the code and i think it's not shell output.

in _utils.py at line 175

regex_prio = r"prio=(\d.*)"

\d matches unicode digit if im not wrong and - is not a digit

@pablodz pablodz closed this as completed in 20cdc75 Sep 2, 2021
@pablodz pablodz reopened this Sep 2, 2021
@pablodz
Copy link
Owner

pablodz commented Sep 2, 2021

I'm releasing a new version of the package

pablodz pushed a commit that referenced this issue Sep 2, 2021
@pablodz
Copy link
Owner

pablodz commented Sep 2, 2021

Please, update to v0.0.93

@BanditSan
Copy link
Author

This version now broken with or without easyeffects

@BanditSan
Copy link
Author

@pablodz
Works doing this way:

regex_prio = r"prio=(-?\d.*)"

pablodz pushed a commit that referenced this issue Sep 3, 2021
@pablodz
Copy link
Owner

pablodz commented Sep 3, 2021

@pablodz
Works doing this way:

regex_prio = r"prio=(-?\d.*)"

okey, there's now a v0.0.94 on pypi

@pablodz pablodz closed this as completed Sep 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants