Skip to content

Commit

Permalink
Remove Spotify from song title
Browse files Browse the repository at this point in the history
I don't know why this happens to some users but it does. So let's fix
it. This fixes #104 and fixes #118.
  • Loading branch information
David Rudie committed Sep 25, 2016
1 parent c030488 commit b1c54cd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Snip/TextHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,12 @@ public static string UnifyTitles(string title)
// Let's see how all lowercase fairs
title = title.ToLower(CultureInfo.InvariantCulture);

// For some unknown reason some versions of Spotify include
// "Spotify - " before the track information. I doubt this
// particular string would appear in any sane song title, so
// let's just remove it.
title = title.Replace(@"Spotify - ", " ");

// title = title.Replace(@".", " "); // Causes failed search result from Spotify
title = title.Replace(@"/", " ");
title = title.Replace(@"\", " ");
Expand Down

0 comments on commit b1c54cd

Please sign in to comment.