Fix for not going to next song after skip, and changed deletion timeframe to two days

This commit is contained in:
kasperrt
2014-12-17 00:14:22 +01:00
parent 3fd3f47366
commit e6803d868e
2 changed files with 13 additions and 2 deletions

View File

@@ -153,6 +153,17 @@ function onPlayerStateChange(newState) {
$("#playpause").toggleClass("pause"); $("#playpause").toggleClass("pause");
} }
} }
if(newState.data == 0)
{
quickFixCountdown = setTimeout(function(){
console.log("trying quickfix");
if(ytplayer.getPlayerState() == 0 && wasPaused){
console.log("quickfixPlay");
startNextSong();
wasPaused = false;
}
},5000);
}
} }
function checkEnd() function checkEnd()

View File

@@ -9,11 +9,11 @@ $dir = scandir('./lists');
$channels = array(); $channels = array();
$all_channels = array(); $all_channels = array();
$time = 60*60*24*4; //4 dager $time = 60*60*24*4; //4 dager
$to = 0; $to = 60*60*24*2;
foreach($dir as $files){ foreach($dir as $files){
if(strpos($files, '.json') !== FALSE){ if(strpos($files, '.json') !== FALSE){
$time_lasted = time() - filemtime('./lists/'.$files); $time_lasted = time() - filemtime('./lists/'.$files);
if($time_lasted > $time) if($time_lasted > $to)
{ {
clearstatcache(); clearstatcache();
$size = filesize('./lists/'.$files); $size = filesize('./lists/'.$files);