UI: Fix YouTube not saving stream key in auto config

Commit 85f9a8661b did not take into account whether YouTube was using a
stream key or not, it would prevent the auto-configuration dialog from
being able to save a YouTube stream key if the user opted to enter in a
stream key instead of connecting their YouTube account.

This simply fixes that by checking to see whether or not the user fully
connected their account or not.

Fixes obsproject/obs-studio#6406
This commit is contained in:
Lain
2023-08-11 15:56:08 -07:00
parent 21f2a7718e
commit b79e6d219f

View File

@@ -1094,7 +1094,7 @@ void AutoConfig::SaveStreamSettings()
obs_data_set_string(settings, "service", serviceName.c_str());
obs_data_set_string(settings, "server", server.c_str());
#ifdef YOUTUBE_ENABLED
if (!IsYouTubeService(serviceName))
if (!streamPage->auth || !IsYouTubeService(serviceName))
obs_data_set_string(settings, "key", key.c_str());
#else
obs_data_set_string(settings, "key", key.c_str());