Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/TrackerCouncil.Smz3.Data/Services/GameDbService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class GameDbService(RandomizerContext context, OptionsFactory optionsFact
{
private readonly RandomizerOptions _options = optionsFactory.Create();

public bool UpdateGeneratedRom(GeneratedRom rom, string? label = null)
public bool UpdateGeneratedRom(GeneratedRom rom, string? label = null, string? hardwarePath = null, string? msuPath = null)
{
var updated = false;

Expand All @@ -22,6 +22,18 @@ public bool UpdateGeneratedRom(GeneratedRom rom, string? label = null)
updated = true;
}

if (hardwarePath != null && hardwarePath != rom.HardwarePath)
{
rom.HardwarePath = hardwarePath;
updated = true;
}

if (msuPath != null && msuPath != rom.MsuPaths)
{
rom.MsuPaths = msuPath;
updated = true;
}

if (updated)
{
context.SaveChanges();
Expand Down
4 changes: 3 additions & 1 deletion src/TrackerCouncil.Smz3.Data/Services/IGameDbService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ public interface IGameDbService
/// </summary>
/// <param name="rom">The GeneratedRom to update</param>
/// <param name="label">The value to update for the label</param>
/// <param name="hardwarePath">The path to the rom on hardware</param>
/// <param name="msuPath">The path to the msu for the rom</param>
/// <returns>True if the GeneratedRom was updated</returns>
public bool UpdateGeneratedRom(GeneratedRom rom, string? label = null);
public bool UpdateGeneratedRom(GeneratedRom rom, string? label = null, string? hardwarePath = null, string? msuPath = null);

/// <summary>
/// Retrieves the list of roms from the database
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<PackageReference Include="Avalonia" Version="11.3.10" />
<PackageReference Include="MattEqualsCoder.DynamicForms.Core" Version="1.5.0" />
<PackageReference Include="MattEqualsCoder.GitHubReleaseChecker" Version="1.1.4" />
<PackageReference Include="MattEqualsCoder.MSURandomizer.Library" Version="3.2.3" />
<PackageReference Include="MattEqualsCoder.MSURandomizer.Library" Version="3.2.4-beta.2" />
<PackageReference Include="NAudio.Wasapi" Version="2.2.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="YamlDotNet" Version="16.3.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="MattEqualsCoder.MSURandomizer.Library" Version="3.2.3" />
<PackageReference Include="MattEqualsCoder.MSURandomizer.Library" Version="3.2.4-beta.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="10.0.2" />
</ItemGroup>

Expand Down
Loading
Loading