Fixed list issues, and some rewrite errors in htaccess

This commit is contained in:
Kasper Rynning-Tønnesen
2015-06-11 15:57:28 +02:00
parent ae5f42f594
commit 89f19491fa
6 changed files with 56 additions and 34 deletions

View File

@@ -27,14 +27,14 @@ function setup_youtube_listener(channel)
{
socket.on(channel.toLowerCase()+",np", function(obj)
{
//console.log(obj);
console.log(obj);
if(obj[0].length == 0){
console.log("Empty list");
document.getElementById('song-title').innerHTML = "Empty channel. Add some songs!";
$("#player_overlay").height($("#player").height());
if(!window.mobilecheck())
$("#player_overlay").toggleClass("hide");
importOldList(channel.toLowerCasettings-barse());
importOldList(channel.toLowerCase());
}
else{
//console.log("gotten new song");
@@ -267,16 +267,19 @@ function readyLooks()
}
function setBGimage(id){
var img = new Image();
img.onload = function () {
var colorThief = new ColorThief();
//console.log(rgbToHsl(colorThief.getColor(img)));
document.getElementsByTagName("body")[0].style.backgroundColor = rgbToHsl(colorThief.getColor(img))
//$("body").css("background-color", rgbToHsl(colorThief.getColor(img)));
//$("body").css("background-color", colorThief.getColor(img));
};
img.crossOrigin = 'Anonymous';
img.src = 'https://cors-anywhere.herokuapp.com/http://img.youtube.com/vi/'+id+'/mqdefault.jpg';
if(id !== undefined)
{
var img = new Image();
img.onload = function () {
var colorThief = new ColorThief();
//console.log(rgbToHsl(colorThief.getColor(img)));
document.getElementsByTagName("body")[0].style.backgroundColor = rgbToHsl(colorThief.getColor(img))
//$("body").css("background-color", rgbToHsl(colorThief.getColor(img)));
//$("body").css("background-color", colorThief.getColor(img));
};
img.crossOrigin = 'Anonymous';
img.src = 'https://cors-anywhere.herokuapp.com/http://img.youtube.com/vi/'+id+'/mqdefault.jpg';
}
}
function notifyUser(id, title) {