Skip to content

Commit

Permalink
Update Song.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
DanTheMan827 authored Jan 13, 2025
1 parent 6082346 commit 20e4a9d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions AmpHelper.Library/Song.cs
Original file line number Diff line number Diff line change
Expand Up @@ -758,9 +758,15 @@ public static void AddSong(DirectoryInfo unpackedPath, string[] songNames, Conso

ValidateSong(songPath, songName, true);

var moggSong = MoggSong.FromMoggsong(Path.Combine(songPath, $"{songName}.moggsong"));
moggSong.MoggPath = $"{songName}.mogg";
moggSong.MidiPath = $"{songName}.mid";

var donorSong = moggSong.DonorSong ?? "tut0";

Check failure on line 765 in AmpHelper.Library/Song.cs

View workflow job for this annotation

GitHub Actions / build

'MoggSong' does not contain a definition for 'DonorSong' and no accessible extension method 'DonorSong' accepting a first argument of type 'MoggSong' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 765 in AmpHelper.Library/Song.cs

View workflow job for this annotation

GitHub Actions / build

'MoggSong' does not contain a definition for 'DonorSong' and no accessible extension method 'DonorSong' accepting a first argument of type 'MoggSong' could be found (are you missing a using directive or an assembly reference?)

foreach (var ext in new string[] { $"mid_{platform}", $"png.dta_dta_{platform}", $"png_{platform}" })
{
var donorFile = Path.Combine(paths.Songs, "tut0", $"tut0.{ext}");
var donorFile = Path.Combine(paths.Songs, donorSong, $"{donorSong}.{ext}");
var destFile = Path.Combine(paths.Songs, songName, $"{songName}.{ext}");

if (!File.Exists(destFile))
Expand All @@ -769,9 +775,6 @@ public static void AddSong(DirectoryInfo unpackedPath, string[] songNames, Conso
}
}

var moggSong = MoggSong.FromMoggsong(Path.Combine(songPath, $"{songName}.moggsong"));
moggSong.MoggPath = $"{songName}.mogg";
moggSong.MidiPath = $"{songName}.mid";
var dtx = moggSong.ToDtx();

using (var dtbStream = File.Create(Path.Combine(songPath, $"{songName}.moggsong_dta_{platform}")))
Expand Down

0 comments on commit 20e4a9d

Please sign in to comment.