Skip to content

Commit 773119d

Browse files
Release/1.0.0 rc9 (#23)
* Fix typo in settings window. * Adds tool tip to Enable Maker Tools checkbox. * Adds callback to logout endpoint when user logs out, to invalidate token. * Updates UI copy. * Blank slates now have 480px max width sub-text field. * Adds 64 char max length to scene collection name, and 32 character max length to export camera name fields. * Fixes possible unintentional freed pointer during scene collection install process. * Improved sign in issue panel.
1 parent 3a70f2b commit 773119d

18 files changed

+311
-136
lines changed

buildspec.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"versionMinor": 0,
4343
"versionPatch": 0,
4444
"buildNumber": 0,
45-
"releaseType": "rc8",
45+
"releaseType": "rc9",
4646
"author": "Elgato",
4747
"website": "https://elgato.com",
4848
"email": "support@elgato.com",

data/locale/en-US.ini

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,56 @@
11
General.SaveButton="Save"
2-
General.SaveChangesButton="Save Changes"
2+
General.SaveChangesButton="Save changes"
33
General.CancelButton="Cancel"
4-
MarketplaceWindow.LoginButton.LogIn="Sign In"
5-
MarketplaceWindow.LoginButton.LogOut="Sign Out"
6-
MarketplaceWindow.OpenSettingsButton.Tooltip="Open Settings"
4+
MarketplaceWindow.LoginButton.LogIn="Sign in"
5+
MarketplaceWindow.LoginButton.LogOut="Sign out"
6+
MarketplaceWindow.OpenSettingsButton.Tooltip="Open settings"
77
MarketplaceWindow.StoreButton.Tooltip="Go to Elgato Marketplace"
8-
MarketplaceWindow.DownloadButton.Tooltip="Click to Download"
8+
MarketplaceWindow.DownloadButton.Tooltip="Click to download"
99
MarketplaceWindow.PurchasedTab="Products"
1010
MarketplaceWindow.Purchased.NoPurchasesTitle="You don't own any scene collection products yet"
1111
MarketplaceWindow.Purchased.NoPurchasesSubtitle="Your digital assets from Marketplace will appear here"
1212
MarketplaceWindow.Purchased.OpenMarketplaceButton="Explore Marketplace"
1313
MarketplaceWindow.LoginNeeded.Title="Sign in to get started"
1414
MarketplaceWindow.LoginNeeded.Subtitle="First off, let's connect your Marketplace account with OBS Studio"
15-
MarketplaceWindow.LoginError.Title="Login Error"
16-
MarketplaceWindow.LoginError.Subtitle="There was an error logging you in. Please click the Log In button above to try again."
15+
MarketplaceWindow.LoginError.Title="Sign in"
16+
MarketplaceWindow.LoginError.Subtitle="There was an issue signing you in. Please try signing in again to continue."
1717
MarketplaceWindow.LoggingIn.Title="Signing you in"
1818
MarketplaceWindow.LoggingIn.Subtitle="Please sign in using the browser window that should have appeared. If no browser window appeared, or you accidentally closed it, click below to try again."
19-
MarketplaceWindow.LoggingIn.TryAgain="Try Again"
20-
MarketplaceWindow.ConnectionError.Title="Connection Error"
19+
MarketplaceWindow.LoggingIn.TryAgain="Try again"
20+
MarketplaceWindow.ConnectionError.Title="Connection error"
2121
MarketplaceWindow.ConnectionError.Subtitle="Could not connect to the server. (please check your network connection)"
22-
MarketplaceWindow.Loading.Title="Loading Your Purchased Products..."
22+
MarketplaceWindow.Loading.Title="Loading your purchased products..."
2323
MarketplaceWindow.Settings.Title="Settings"
2424
MarketplaceWindow.Settings.DefaultVideoDevice.Label="Default camera"
25-
MarketplaceWindow.Settings.DefaultVideoDevice.NoneSelected="None Selected"
26-
MarketplaceWindow.Settings.DefaultVideoDevice.SettingsButton.Tooltip="Video Capture Device Settings"
25+
MarketplaceWindow.Settings.DefaultVideoDevice.NoneSelected="None selected"
26+
MarketplaceWindow.Settings.DefaultVideoDevice.SettingsButton.Tooltip="Video capture device settings"
2727
MarketplaceWindow.Settings.DefaultAudioDevice.Label="Default microphone"
28-
MarketplaceWindow.Settings.InstallLocation="Medial File Install Location"
29-
MarketplaceWindow.Settings.EnableMakerTools="Turn on Maker tools"
30-
MarketplaceWindow.Settings.MakerToolsRestartWarning.Disabled="Maker tools will be disabled after restarting OBS."
31-
MarketplaceWindow.Settings.MakerToolsRestartWarning.Enabled="Maker tools will be enabled after restarting OBS."
32-
MarketplaceWindow.DownloadProduct.NetworkError.Title="Network Connection Error"
28+
MarketplaceWindow.Settings.InstallLocation="Media file install location"
29+
MarketplaceWindow.Settings.EnableMakerTools="Turn on maker tools"
30+
MarketplaceWindow.Settings.EnableMakerTools.Tooltip="Enables export and import tools for makers who want to create scene collections for the Elgato Marketplace."
31+
MarketplaceWindow.Settings.MakerToolsRestartWarning.Disabled="Maker tools will be disabled after restarting OBS"
32+
MarketplaceWindow.Settings.MakerToolsRestartWarning.Enabled="Maker tools will be enabled after restarting OBS"
33+
MarketplaceWindow.DownloadProduct.NetworkError.Title="Network connection error"
3334
MarketplaceWindow.DownloadProduct.NetworkError.Subtitle="Could not connect to the Marketplace. Please try again."
34-
MarketplaceWindow.DownloadProduct.InvalidFiletype.Title="Invalid File Type"
35-
MarketplaceWindow.DownloadProduct.InvalidFiletype.Subtitle="File is not an .elgatoscene file."
35+
MarketplaceWindow.DownloadProduct.InvalidFiletype.Title="Invalid file type"
36+
MarketplaceWindow.DownloadProduct.InvalidFiletype.Subtitle="File is not an .elgatoscene file"
3637
ExportWizard.NextButton="Continue"
3738
ExportWizard.BackButton="Back"
3839
ExportWizard.SaveAsButton="Save as"
3940
ExportWizard.CloseButton="Done"
4041
ExportWizard.MediaFileCheck.Title="Review your export"
41-
ExportWizard.MediaFileCheck.Text=" media files were found to bundle."
42+
ExportWizard.MediaFileCheck.Text=" media files were found to bundle"
4243
ExportWizard.VideoSourceLabels.Title="Name video sources"
4344
ExportWizard.VideoSourceLabels.Text="Choose how your video sources will appear for users"
4445
ExportWizard.VideoSourceLabels.InputPlaceholder="Description text goes here"
45-
ExportWizard.VideoSourceLabels.NoCaptureSourcesText="No video capture sources found."
46+
ExportWizard.VideoSourceLabels.NoCaptureSourcesText="No video capture sources found"
4647
ExportWizard.RequiredPlugins.Title="Add required plugins"
4748
ExportWizard.RequiredPlugins.Text="Select any plugins needed to run this asset"
48-
ExportWizard.RequiredPlugins.NoPluginsFound="No installed plugins found."
49+
ExportWizard.RequiredPlugins.NoPluginsFound="No installed plugins found"
4950
ExportWizard.ExportComplete.Title="Export complete"
50-
ExportWizard.ExportComplete.Text="Your scene collection is now ready to test or upload to Marketplace."
51+
ExportWizard.ExportComplete.Text="Your scene collection is now ready to test or upload to Marketplace"
5152
ExportWizard.Exporting.Title="Exporting Bundle..."
52-
ExportWizard.Exporting.Text="Note: this can take a few minutes for scene collections with large files."
53+
ExportWizard.Exporting.Text="This can take a few minutes for scene collections with large files"
5354
SetupWizard.WindowTitle="Install Scene Collection"
5455
SetupWizard.NextButton="Continue"
5556
SetupWizard.BackButton="Back"
@@ -61,15 +62,15 @@ SetupWizard.MissingPlugins.DownloadButton="Get"
6162
SetupWizard.SelectInstall.Title="How do you want to install this?"
6263
SetupWizard.SelectInstall.NewInstallButton="New"
6364
SetupWizard.SelectInstall.ExistingInstallButton="Add"
64-
SetupWizard.CreateCollection.Title="Create Scene Collection"
65-
SetupWizard.CreateCollection.NewNamePlaceholder="Collection Name"
66-
SetupWizard.NameInUseError.Title="Name in use."
65+
SetupWizard.CreateCollection.Title="Create ccene collection"
66+
SetupWizard.CreateCollection.NewNamePlaceholder="Collection name"
67+
SetupWizard.NameInUseError.Title="Name in use"
6768
SetupWizard.NameInUseError.Text="A scene collection already exists with this name. Please provide another name."
6869
SetupWizard.AudioSetup.Device.Text="Select a microphone"
6970
SetupWizard.Loading.Title="Loading Collection..."
70-
SetupWizard.Loading.Text="Note: this can take some time for scene collections with large files."
71+
SetupWizard.Loading.Text="This can take some time for scene collections with large files"
7172
SetupWizard.IncompatibleFile.Title="Incompatible file"
72-
SetupWizard.IncompatibleFile.Text="Error: This download did not contain a valid bundleInfo.json file and cannot be installed. (note: this is a problem with the submitted scene collection file on the server)"
73+
SetupWizard.IncompatibleFile.Text="Error: this download did not contain a valid bundleInfo.json file and cannot be installed. (this is a problem with the submitted scene collection file on the server)"
7374
UpdateModal.Title="Update available"
7475
UpdateModal.SkipVersionButton="No thanks"
7576
UpdateModal.LaterButton="Ask me later"

src/api.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ MarketplaceApi::MarketplaceApi()
6464

6565
void MarketplaceApi::logOut()
6666
{
67+
std::string url = _authUrl + "/auth/realms/mp/protocol/openid-connect/logout";
68+
auto ec = GetElgatoCloud();
69+
auto refreshToken = ec->GetRefreshToken();
70+
auto accessToken = ec->GetAccessToken();
71+
if (refreshToken != "") {
72+
std::string postBody = "{\"client_id\": \"elgatolink\", \"refresh_token\": \"" + refreshToken + "\" }";
73+
auto resp = fetch_string_from_post(url, postBody, accessToken);
74+
}
6775
_loggedIn = false;
6876
_hasAvatar = false;
6977
_avatarReady = false;
@@ -111,11 +119,9 @@ void MarketplaceApi::setUserDetails(nlohmann::json &data)
111119
std::lock_guard<std::mutex> lock(_mtx);
112120
if (!_avatarDownloading) {
113121
if (!os_file_exists(avatarPath.c_str())) {
114-
obs_log(LOG_INFO, "Downloading avatar %s", filename.c_str());
115122
_downloadAvatar();
116123
}
117124
else {
118-
obs_log(LOG_INFO, "Avatar Exists %s", filename.c_str());
119125
_avatarPath = avatarPath;
120126
_avatarReady = true;
121127
}

src/downloader.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ size_t Downloader::DownloadEntry::handle_progress(void *ptr, curl_off_t dltotal,
130130
UNUSED_PARAMETER(ultotal);
131131
UNUSED_PARAMETER(ulnow);
132132
//double pct = (int)((double)dlnow / (double)dltotal * 100.0);
133-
obs_log(LOG_INFO, "%s: %i of %i", self.url.c_str(), dlnow, dltotal);
134133
return CURL_PROGRESSFUNC_CONTINUE;
135134
}
136135

@@ -192,8 +191,6 @@ Downloader::DownloadEntry::DownloadEntry(Downloader *parent, std::string url,
192191
count = count - start;
193192
}
194193
detectedFileName = url.substr(start, count);
195-
obs_log(LOG_INFO, "Detected filename: %s",
196-
detectedFileName.c_str());
197194
}
198195
}
199196

@@ -222,8 +219,6 @@ void Downloader::DownloadEntry::Finish()
222219
}
223220

224221
if (targetDirectory != "") {
225-
obs_log(LOG_INFO, "Saving file to: %s",
226-
(targetDirectory + fileName).c_str());
227222
if (fileName == "") {
228223
fileName = random_name();
229224
}

src/elgato-cloud-config.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,6 @@ void DefaultAVWidget::OBSVolumeLevel(void *data,
345345
{
346346
UNUSED_PARAMETER(peak);
347347
UNUSED_PARAMETER(inputPeak);
348-
//obs_log(LOG_INFO, "OBS Volume Level");
349348
auto config = static_cast<DefaultAVWidget *>(data);
350349
float mag = magnitude[0];
351350
float pk = peak[0];
@@ -548,6 +547,7 @@ ElgatoCloudConfig::ElgatoCloudConfig(QWidget *parent) : QDialog(parent)
548547
checkBoxStyle.replace("${checked-img}", checkedImage.c_str());
549548
checkBoxStyle.replace("${unchecked-img}", uncheckedImage.c_str());
550549
_makerCheckbox->setStyleSheet(checkBoxStyle);
550+
_makerCheckbox->setToolTip(obs_module_text("MarketplaceWindow.Settings.EnableMakerTools.Tooltip"));
551551
layout->addWidget(_makerCheckbox);
552552

553553
connect(_makerCheckbox, &QCheckBox::stateChanged, [this](int state) {
@@ -630,7 +630,6 @@ void ElgatoCloudConfig::OpenConfigAudioSource()
630630
for (size_t i = 0; i < obs_property_list_item_count(devices); i++) {
631631
std::string name = obs_property_list_item_name(devices, i);
632632
std::string id = obs_property_list_item_string(devices, i);
633-
obs_log(LOG_INFO, "--- MIC: %s [%s]", name.c_str(), id.c_str());
634633
}
635634
obs_properties_destroy(props);
636635
}

src/elgato-cloud-data.cpp

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,20 @@ std::string ElgatoCloud::GetAccessToken()
105105
}
106106
}
107107

108+
std::string ElgatoCloud::GetRefreshToken()
109+
{
110+
if (!loggedIn) {
111+
return "";
112+
}
113+
_TokenRefresh(false, false);
114+
if (loggedIn) {
115+
return _refreshToken;
116+
}
117+
else { // Our refresh token has expired, we're not really logged in.
118+
return "";
119+
}
120+
}
121+
108122
void ElgatoCloud::_TokenRefresh(bool loadData, bool loadUserDetails)
109123
{
110124
const auto now = std::chrono::system_clock::now();
@@ -283,21 +297,20 @@ void ElgatoCloud::StartLogin()
283297
stringhash + "&code_challenge_method=S256";
284298

285299
authorizing = true;
286-
obs_log(LOG_INFO, "Starting login process...");
287-
obs_log(LOG_INFO, "Opening in browser:\n%s", url.c_str());
288300
ShellExecuteA(NULL, NULL, url.c_str(), NULL, NULL, SW_SHOW);
289301
}
290302

291303
void ElgatoCloud::LogOut()
292304
{
305+
auto api = MarketplaceApi::getInstance();
306+
api->logOut();
307+
293308
_accessToken = "";
294309
_refreshToken = "";
295310
_accessTokenExpiration = 0;
296311
_refreshTokenExpiration = 0;
297312
_SaveState();
298313
loggedIn = false;
299-
auto api = MarketplaceApi::getInstance();
300-
api->logOut();
301314

302315
if (mainWindowOpen && window) {
303316
window->setLoggedIn();
@@ -479,7 +492,7 @@ void ElgatoCloud::_LoadUserData(bool loadData)
479492
}
480493
} catch (...) {
481494
obs_log(LOG_INFO, "Invalid response from server");
482-
connectionError = true;
495+
loginError = true;
483496
}
484497
}
485498

src/elgato-cloud-data.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ class ElgatoCloud {
5757
void SetSkipVersion(std::string version);
5858
void SaveConfig();
5959
std::string GetAccessToken();
60+
std::string GetRefreshToken();
6061
nlohmann::json GetPurchaseDownloadLink(std::string variantId);
6162

6263
obs_module_t *GetModule();

0 commit comments

Comments
 (0)