Skip to content

Commit

Permalink
Improve import installed game feature
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkeye116477 committed Jan 29, 2024
1 parent 5f205a7 commit fb8ba69
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/LegendaryGameInstaller.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,12 @@ private async void ImportBtn_Click(object sender, RoutedEventArgs e)
.ExecuteBufferedAsync();
if (importCmd.StandardError.Contains("has been imported"))
{
playniteAPI.Dialogs.ShowMessage(LOC.LegendaryImportFinished);
InstallerWindow.DialogResult = true;
}
else
{
playniteAPI.Dialogs.ShowErrorMessage(ResourceProvider.GetString(LOC.LegendaryGameImportFailure).Format(LOC.LegendaryCheckLog));
logger.Debug("[Legendary] " + importCmd.StandardError);
logger.Error("[Legendary] exit code: " + importCmd.ExitCode);
}
Expand Down
1 change: 1 addition & 0 deletions src/Localization/en_US.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<sys:String x:Key="LOCLegendarySyncError">An error occurred while syncing {0} game saves to the cloud.</sys:String>
<sys:String x:Key="LOCLegendaryImportingGame">Importing {0}...</sys:String>
<sys:String x:Key="LOCLegendaryImportFinished">Import finished. Have fun.</sys:String>
<sys:String x:Key="LOCLegendaryGameImportFailure">Failed to import game. Reason: {0}.</sys:String>
<sys:String x:Key="LOCLegendaryMaxWorkers">Maximum number of worker processes</sys:String>
<sys:String x:Key="LOCLegendaryMaxSharedMemory">Maximum amount of shared memory (MB)</sys:String>
<sys:String x:Key="LOCLegendaryDownloadManager">Download Manager</sys:String>
Expand Down
4 changes: 4 additions & 0 deletions src/LocalizationKeys.cs
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,10 @@ public static class LOC
/// </summary>
public const string LegendaryImportFinished = "LOCLegendaryImportFinished";
/// <summary>
/// Failed to import game. Reason: {0}.
/// </summary>
public const string LegendaryGameImportFailure = "LOCLegendaryGameImportFailure";
/// <summary>
/// Maximum number of worker processes
/// </summary>
public const string LegendaryMaxWorkers = "LOCLegendaryMaxWorkers";
Expand Down

0 comments on commit fb8ba69

Please sign in to comment.