public override IEnumerable <Issue> GetIssues(BeatmapSet beatmapSet) { for (int i = 0; i < beatmapSet.songFilePaths.Count; ++i) { string filePath = beatmapSet.songFilePaths[i].Substring(beatmapSet.songPath.Length + 1); string fileNameWithExtension = filePath.Split(new char[] { '/', '\\' }).Last().ToLower(); if (beatmapSet.IsFileUsed(filePath) || fileNameWithExtension == "thumbs.db") { continue; } string fileName = PathStatic.ParsePath(fileNameWithExtension, withoutExtension: true); string otherFilePath = beatmapSet.hitSoundFiles.FirstOrDefault(file => file.StartsWith(fileName + ".")); if (otherFilePath != null) { yield return(new Issue(GetTemplate("Unused Overridden"), null, filePath, otherFilePath)); } else { yield return(new Issue(GetTemplate("Unused"), null, filePath)); } } }
public override IEnumerable <Issue> GetIssues(BeatmapSet aBeatmapSet) { for (int i = 0; i < aBeatmapSet.songFilePaths.Count; ++i) { string filePath = aBeatmapSet.songFilePaths[i].Substring(aBeatmapSet.songPath.Length + 1); string fileName = filePath.Split(new char[] { '/', '\\' }).Last().ToLower(); if (!aBeatmapSet.IsFileUsed(filePath) && fileName != "thumbs.db") { yield return(new Issue(GetTemplate("Unused"), null, filePath)); } } }