rtmp-services: Remove Twtich "Auto" if API down and not cached

Prevents new users from having a poor user experience if the Twitch API
for getting the closest servers is currently down.
This commit is contained in:
jp9000
2017-08-02 15:13:09 -07:00
parent 02b4ea028e
commit 9add73f656
2 changed files with 3 additions and 15 deletions
+3 -3
View File
@@ -247,12 +247,12 @@ static bool fill_twitch_servers_locked(obs_property_t *servers_prop)
{
size_t count = twitch_ingest_count();
obs_property_list_add_string(servers_prop,
obs_module_text("Server.Auto"), "auto");
if (count <= 1)
return false;
obs_property_list_add_string(servers_prop,
obs_module_text("Server.Auto"), "auto");
for (size_t i = 0; i < count; i++) {
struct twitch_ingest ing = twitch_ingest(i);
obs_property_list_add_string(servers_prop, ing.name, ing.url);