Add Configurable Launch Timeout to Spotify App Launch
This Pull Request introduces the ability to configure the timeout for launching the Spotify application within spotcast. The primary motivation behind this enhancement is to provide users with more control over the launch process, particularly in varying network conditions where the default timeout may not be sufficient.
Key Changes:
- Configurable Timeout: Adds a launch_timeout parameter to the launch_app method, allowing for dynamic adjustment based on user configuration or environmental conditions.
- Improved Error Handling: Updates the LaunchError exception message to include the launch_timeout value. This enhancement aids in debugging by explicitly stating the timeout duration after which the launch was considered unsuccessful.
- Service Schema Update: Adjusts the spotcast.start service schema to recognize set_launch_timeout as an optional parameter, enabling users to specify a custom timeout for each launch attempt via service calls.
Motivation and Context:
In some environments, the response time from the Spotify app can exceed the previously hard-coded timeout, leading to premature launch failures. By making the timeout configurable, we empower users to tailor the component's behavior to their specific setup, potentially reducing the occurrence of unnecessary errors and improving the overall reliability of the Spotify launch process.
Testing:
I have done testing for myself and it seems to work, please test this yourself before merging.
How do you use this where do you set launch_timeout and what value should you use?
@NonaSuomy its in seconds with a minimum of 10 second and you can configure it via the ui or use it in a service call
@bruvv I had to update som breaking change with pychromecast, can you fix merge conflict. I'll work on integrating your pr
@fcusson sure, i have updated it. let me know if you need anything else. I have not tested this merge now tho so please test it first.
Thank you
@fcusson any update on this?
Is this part of a release already?
Not yet need to draft it and make the release. I was planning on doing that during the weekend