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

Expose delay parameter for Hold action in Companion Protocol #2552

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dmrgn1991
Copy link
Contributor

@postlund I realized that I forgot to add any way of exposing the delay parameter for the Hold action in Companion. In practice this means that the delay value is currently hard-coded and as a result the app I'm testing is still uncooperative. This minor change exposes the delay param to the public key methods so that the user can set longer holds. Sorry I didn't think of this sooner, it should have been in my initial PR for sure.

@postlund
Copy link
Owner

postlund commented Nov 4, 2024

I have not added this before as I have not seen any direct need for it, but I do see a use case for it so it is ok to add. As all the methods are part of the external interface (as defined in interface.py), it's not as easy as just adding new arguments. You must update the interface, update the facade (facade.py) and make sure to add the argument to all other protocols as well. Preferably update the other protocols to support the delay too. Delay would only be applicable to hold and can have the default value of one second.

I suggest that you read up about relaying and the facade here:

https://pyatv.dev/internals/design#relaying

It should help you get going. It is also worth adding this to the documentation to help others knowing about this feature:

https://pyatv.dev/development/control/

@dmrgn1991
Copy link
Contributor Author

Okay, that makes sense, and I should have realized this would be more involved. I'll look into this and try to provide a complete implementation. Thanks, as always.

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

Successfully merging this pull request may close these issues.

2 participants