Improved spotify list importing

This commit is contained in:
Kasper Rynning-Tønnesen
2016-08-31 13:10:38 +02:00
parent d6e9278a30
commit c9dc08fe52
5 changed files with 14 additions and 11 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
!function(){function o(o){var e,t=o.substring(1).split("&"),i={};for(var a in t)e=t[a].split("="),2==e.length&&(i[e[0]]=e[1]);return i}window.addEventListener("load",function(){console.log("hello");var e="b934ecdd173648f5bcd38738af529d58",t="https://zoff.no/spotify_callback",i="token",a="playlist-read-private playlist-read-collaborative user-read-private";if(window.location.hash.length<=0)window.location.href="https://accounts.spotify.com/authorize?client_id="+e+"&scope="+a+"&show_dialog=false&response_type="+i+"&redirect_uri="+t;else{var n=o(window.location.hash);window.opener.callback(n)}})}();
!function(){function o(o){var t,e=o.substring(1).split("&"),a={};for(var i in e)t=e[i].split("="),2==t.length&&(a[t[0]]=t[1]);return a}window.addEventListener("load",function(){console.log("hello");var t="b934ecdd173648f5bcd38738af529d58",e="http://localhost/spotify_callback",a="token",i="playlist-read-private playlist-read-collaborative user-read-private";if(window.location.hash.length<=0)window.location.href="https://accounts.spotify.com/authorize?client_id="+t+"&scope="+i+"&show_dialog=false&response_type="+a+"&redirect_uri="+e;else{var l=o(window.location.hash);window.opener.callback(l)}})}();

View File

@@ -145,15 +145,18 @@ var Search = {
//$.each(artist, function(i, data_artist){
if(data.snippet.title.toLowerCase().indexOf(artist[0].toLowerCase()) == -1 &&
(data.snippet.channelTitle.toLowerCase().indexOf(artist[0].toLowerCase()) == -1 &&
data.snippet.channelTitle.toLowerCase().indexOf("vevo") == -1) &&
(data.snippet.title.toLowerCase().indexOf("remix") >= 0 &&
title.toLowerCase().indexOf("remix") == -1)
){
data.snippet.channelTitle.toLowerCase().indexOf("vevo") == -1)){
acceptable_track = false;
return false;
}
//});
if(data.snippet.title.toLowerCase().indexOf("cover") == -1 && acceptable_track && title.toLowerCase().indexOf("cover") == -1) {
if(data.snippet.title.toLowerCase().indexOf("cover") == -1 &&
acceptable_track && title.toLowerCase().indexOf("cover") == -1 &&
((data.snippet.title.toLowerCase().indexOf("remix") == -1 &&
title.toLowerCase().indexOf("remix") == -1) ||
(data.snippet.title.toLowerCase().indexOf("remix") != -1 &&
title.toLowerCase().indexOf("remix") != -1))) {
vid_url += data.id.videoId+",";
}
});

View File

@@ -1,7 +1,7 @@
window.addEventListener("load", function(){
console.log("hello");
var client_id = "b934ecdd173648f5bcd38738af529d58";
var redirect = "https://zoff.no/spotify_callback";
var redirect = "http://localhost/spotify_callback";
var response = "token";
var scope = "playlist-read-private playlist-read-collaborative user-read-private";
if(window.location.hash.length <= 0){