提交 c144609c 编写于 作者: J jp9000

UI: If Mixer account disconnected, retry login

If the user disconnects OBS from their Mixer account on their Mixer
settings panel, then try asking the user if they'd like to reconnect
before throwing an error.
上级 0170278a
......@@ -141,7 +141,20 @@ try {
if (!error.empty())
throw ErrorInfo(error, json["error_description"].string_value());
key_ = id + "-" + json["streamKey"].string_value();
std::string key_suffix = json["streamKey"].string_value();
/* Mixer does not throw an error; instead it gives you the channel data
* json without the data you normally have privileges for, which means
* it'll be an empty stream key usually. So treat empty stream key as
* an error. */
if (key_suffix.empty()) {
if (RetryLogin()) {
return GetChannelInfo();
}
throw ErrorInfo("Auth Failure", "Could not get channel data");
}
key_ = id + "-" + key_suffix;
return true;
} catch (ErrorInfo info) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册