mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 11:26:27 +00:00
Workshop - Fix installing new versions of profiles
This commit is contained in:
1 parent
648b7765ef
commit
00948de9d6
3 files changed
+8
-23
No files matched your search
+8
-3
@@ -42,11 +42,16 @@ public class ProfileEntryInstallationHandler : IEntryInstallationHandler
|
||||
ProfileConfiguration? existing = _profileService.ProfileCategories.SelectMany(c => c.ProfileConfigurations).FirstOrDefault(c => c.ProfileId == profileId);
|
||||
if (existing != null)
|
||||
{
|
||||
ProfileConfiguration overwritten = await _profileService.OverwriteProfile(stream, existing);
|
||||
ProfileConfiguration overwritten = await _profileService.ImportProfile(stream, existing.Category, true, false, null, existing);
|
||||
overwritten.Name = existing.Name;
|
||||
|
||||
// Update the release
|
||||
installedEntry.SetMetadata("ProfileId", overwritten.ProfileId);
|
||||
|
||||
// Update the release and return the profile configuration
|
||||
UpdateRelease(installedEntry, release);
|
||||
|
||||
// With everything updated, remove the old profile
|
||||
_profileService.RemoveProfileConfiguration(existing);
|
||||
|
||||
return EntryInstallResult.FromSuccess(installedEntry);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user