Skip to content

Commit bb07188

Browse files
Added cover asset are error and summary
1 parent 1a3bbd9 commit bb07188

6 files changed

+62
-1
lines changed

Program.cs

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ static void Main(string[] args)
3535
StreamReader r = new StreamReader(ofd.FileName);
3636
String line = "";
3737
List<String> found = new List<string>();
38+
39+
List<String> cover = new List<string>();
40+
List<string> failedload = new List<string>();
41+
List<string> weirderror = new List<string>();
42+
3843
while((line = r.ReadLine()) != null)
3944
{
4045
if (i >= start && line.Length > 28)
@@ -45,6 +50,8 @@ static void Main(string[] args)
4550
if (line.Contains("custom_level_") && line.Contains("Cover"))
4651
{
4752
err = "Custom level contains unsupported cover format (" + line.Substring(line.IndexOf("custom_level_"), 53) + ")";
53+
if(!cover.Contains(line.Substring(line.IndexOf("custom_level_"), 53))) cover.Add(line.Substring(line.IndexOf("custom_level_"), 53));
54+
4855
if (!found.Contains(err))
4956
{
5057
found.Add(err);
@@ -53,6 +60,7 @@ static void Main(string[] args)
5360
else if (line.Contains("custom_level_") && line.Contains("failed to load"))
5461
{
5562
err = "Custom level (" + line.Substring(line.IndexOf("custom_level_"), 53) + ") couldn't load at line " + i;
63+
if (!failedload.Contains(line.Substring(line.IndexOf("custom_level_"), 53))) failedload.Add(line.Substring(line.IndexOf("custom_level_"), 53));
5664
if (!found.Contains(err))
5765
{
5866
found.Add(err);
@@ -74,6 +82,22 @@ static void Main(string[] args)
7482
found.Add(err);
7583
}
7684
}
85+
else if(line.Contains("Error loading cover art asset Failed to allocate"))
86+
{
87+
88+
string tryhash = File.ReadLines(ofd.FileName).Skip(i-1).Take(1).First();
89+
string hash = "N/A";
90+
try
91+
{
92+
hash = tryhash.Substring(tryhash.IndexOf("hash") + 5, 40);
93+
} catch { }
94+
err = "Cover asset art failed to load. Potientioal Song hash " + hash + " at line " + i;
95+
if (!weirderror.Contains(hash)) weirderror.Add(hash);
96+
if (!found.Contains(err))
97+
{
98+
found.Add(err);
99+
}
100+
}
77101
}
78102
else if(line.Substring(25, 3) == "MSG")
79103
{
@@ -99,14 +123,51 @@ static void Main(string[] args)
99123
i++;
100124
}
101125
Console.WriteLine("\ncommon fixes:");
102-
Console.WriteLine("- Questom asset problem: tell the person to delete the songs with a unsupported cover format. If that doesn't help tell them to delete songs that failed to load.");
126+
//Console.WriteLine("- Questom asset problem: tell the person to delete the songs with a unsupported cover format. If that doesn't help tell them to delete songs that failed to load.");
103127
Console.WriteLine("- FileStream Problem: tell the persong to enable both permssions for BMBF in sidequest");
104128
Console.WriteLine("\n---Log Start---");
105129
foreach(String c in found)
106130
{
107131
Console.WriteLine(c);
108132
}
109133
Console.WriteLine("\n\n---Log End---");
134+
Console.WriteLine("\n\n---Song Summary---");
135+
136+
if (cover.Count != 0)
137+
{
138+
Console.WriteLine("\nUnsopported Cover formats (delete those songs):");
139+
foreach (String c in cover)
140+
{
141+
Console.WriteLine(" - " + c);
142+
}
143+
}
144+
145+
146+
if (failedload.Count != 0)
147+
{
148+
//Console.WriteLine("\nSongs that failed to load (delete those songs if deleting the ones with unsupported cover format didn't help):");
149+
foreach (String c in failedload)
150+
{
151+
Console.WriteLine(" - " + c);
152+
}
153+
}
154+
155+
if (weirderror.Count != 0)
156+
{
157+
Console.WriteLine("\nCover asset are failed to load (definetly delete those ones; potential song hash):");
158+
foreach (String c in weirderror)
159+
{
160+
Console.WriteLine(" - " + c);
161+
}
162+
}
163+
if(weirderror.Count != 0 || cover.Count != 0 || failedload.Count != 0)
164+
{
165+
Console.WriteLine("\n\nAnd don't forget to hit reload songs folder afterwards");
166+
} else
167+
{
168+
Console.WriteLine("Nothing found");
169+
}
170+
110171
Console.ReadLine();
111172
}
112173
}
1.5 KB
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
1.5 KB
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)