Rule for dot at the end

This commit is contained in:
Kasper Rynning-Tønnesen
2017-01-07 17:32:36 +01:00
parent cbf73d3d7c
commit 7f1d3dd51c
3 changed files with 6 additions and 3 deletions

View File

@@ -500,6 +500,9 @@ var List = {
data.name = data.name.replace(" ", " ").replace(" ", " ").replace(" ", " ").replace(" ", " ").replace(" ", " ").replace(" ", " ").replace(" ", " ").replace(" ", " ");
data.artists[0].name = data.artists[0].name.replace(" ", " ").replace(" ", " ").replace(" ", " ").replace(" ", " ").replace(" ", " ").replace(" ", " ").replace(" ", " ").replace(" ", " ");
if(data.name.substring(data.name.length-1) == " ") data.name = data.name.substring(0,data.name.length-1);
if(data.name.substring(data.name.length-1) == "." && track.substring(track.length-1) != "."){
data.name = data.name.substring(0,data.name.length-1);
}
if(decodeURIComponent(track).indexOf(data.artists[0].name.toLowerCase()) >= 0 && decodeURIComponent(track).indexOf(data.name.toLowerCase()) >= 0){
found = true;
List.uris.push(data.uri);