- If the stream is already live or going live, do not reset or
transition
- If the stream is testing, transition but do not reset
- If the stream is starting a test, error out since this can take a
while
- If the attempted transition was redunant, still return a success
Fixes#5403
All these fixes are interlinked but to explain them further:
Event selection would only partially work, the code to re-use an
existing liveStream was never hit and so didn't work. It would also
break going live because broadcast_id would never be set. Additionally
it called StartBroadcast for no reason if autostart was enabled.
API usage was unoptimal. Instead of only fetching the events we need
(active, ready) it would fetch *every single livestream* on the youtube
channel, 7 at a time, and then throw away every single result in the
majority of use cases.
This commit changes it to only fetch "active" and "ready" broadcasts and
then only filters out active ones that cannot be resumed (because
they're stil live).
Resuming existing streams also didn't work because they were just thrown
out by the selection. Now they get included if the attached liveStream
is not receiving data. The're distinguished in the UI and are listed
first. Simply selecting them and starting the stream will work.
These's still some stuff left, like redundant API calls. But thankfully
those fail silently and we can simply ignore it for now.
Adds the ability to provide translated messages for YouTube API erorr
reasons.
Also adds translation for various internal errors that were previously
hardcoded to english.
Minor changes to existing translation strings to improve
translatability.