Permalink
Browse files

- fixed AlbumArtPath exceptions caused by image file names that have …

…extra underscores '_'

  (thanks to cu1t for the contribution and pull request)
  • Loading branch information...
cozy1 committed Jan 30, 2019
1 parent dfeda5a commit bacdb7d3174bf2045ed53cb6b386c273b0f5b29c
@@ -659,7 +659,7 @@ public void UpdateSongXml(Arrangement arr, DLCPackageData info)
// all other ArrangementProperties in the xml are set by EOF and not changed by Toolkit (currently)
song2014.ArrangementProperties = arr.ArrangementPropeties != null ? arr.ArrangementPropeties : new SongArrangementProperties2014();
song2014.ArrangementProperties.Represent = arr.Represent ? 1 : 0;
song2014.ArrangementProperties.BonusArr = arr.BonusArr ? 1 : 0;
song2014.ArrangementProperties.BonusArr = arr.BonusArr ? 1 : 0;
song2014.ArrangementProperties.PathLead = Convert.ToInt32(arr.RouteMask == RouteMask.Lead);
song2014.ArrangementProperties.PathRhythm = Convert.ToInt32(arr.RouteMask == RouteMask.Rhythm);
song2014.ArrangementProperties.PathBass = Convert.ToInt32(arr.RouteMask == RouteMask.Bass);
@@ -938,10 +938,12 @@ public void FillPackageCreatorForm(DLCPackageData info, string filesBaseDir)
}

// Album art
AlbumArtPath = info.AlbumArtPath.AbsoluteTo(BasePath);
// forces the ArtFiles array to be generated from the AlbumArtPath
if (!String.IsNullOrEmpty(AlbumArtPath))
if (!String.IsNullOrEmpty(info.AlbumArtPath))
{
AlbumArtPath = info.AlbumArtPath.AbsoluteTo(BasePath);
// forces the ArtFiles array to be generated from the AlbumArtPath
info.ArtFiles = null;
}

// Lyric art
if (!String.IsNullOrEmpty(info.LyricArtPath))
@@ -29,5 +29,5 @@
//
// THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT
[assembly: AssemblyVersion("2.9.2.0")]
[assembly: AssemblyInformationalVersion("27dec27b")]
[assembly: AssemblyInformationalVersion("dfeda5a6")]
[assembly: AssemblyConfiguration("")]
@@ -1,5 +1,7 @@
Rocksmith Toolkit Release Notes

- fixed AlbumArtPath exceptions caused by image file names that have extra underscores '_'
(thanks to cu1t for the contribution and pull request)
- fixed arrangement represent bug
- improved verification of external apps
- added app.config file (may avoid some errors)
@@ -743,9 +743,9 @@ public static DLCPackageData LoadFromFolder(string unpackedDir, Platform targetP
{
var ddsFilesC = new List<DDSConvertedFile>();
foreach (var file in ddsFiles)
switch (Path.GetFileNameWithoutExtension(file).Split('_')[2])
{
switch (Path.GetFileNameWithoutExtension(file).Split('_').Last())
{

case "256":
data.AlbumArtPath = file;
ddsFilesC.Add(new DDSConvertedFile() { sizeX = 256, sizeY = 256, sourceFile = file, destinationFile = file.CopyToTempFile(".dds") });
@@ -757,6 +757,7 @@ public static DLCPackageData LoadFromFolder(string unpackedDir, Platform targetP
ddsFilesC.Add(new DDSConvertedFile() { sizeX = 64, sizeY = 64, sourceFile = file, destinationFile = file.CopyToTempFile(".dds") });
break;
}
}

data.ArtFiles = ddsFilesC;
}
@@ -27,5 +27,5 @@
//
// THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT
[assembly: AssemblyVersion("2.9.2.0")]
[assembly: AssemblyInformationalVersion("27dec27b")]
[assembly: AssemblyInformationalVersion("dfeda5a6")]
[assembly: AssemblyConfiguration("")]
@@ -29,5 +29,5 @@
//
// THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT
[assembly: AssemblyVersion("2.9.2.0")]
[assembly: AssemblyInformationalVersion("27dec27b")]
[assembly: AssemblyInformationalVersion("dfeda5a6")]
[assembly: AssemblyConfiguration("")]
@@ -1,3 +1,3 @@
2.9.2.0
27dec27b
dfeda5a6

0 comments on commit bacdb7d

Please sign in to comment.