Beispiel #1
0
        private string CleanTrackName(string track) {
            //By removing these strings, we raise the chance to find a proper cover image
            var misleadingWords = new[] {
                                            "Original Version", "Radio Edit", "Single Version", "Original Mix",
                                            "Explicit Version", "Single Mix"
                                        };

            var formats = new[] {"- {0}", "({0})", "[{0}]"};
            return misleadingWords.Aggregate(track,
                                              (currentWord, word) =>
                                              formats.Aggregate(currentWord, (current, format) =>
                                                  current.Replace(string.Format(format, word), string.Empty)))
                                                  .Trim();
        }