diff --git a/js/youtube.js b/js/youtube.js index b8c5bdb8..1c40dbc9 100755 --- a/js/youtube.js +++ b/js/youtube.js @@ -153,6 +153,17 @@ function onPlayerStateChange(newState) { $("#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() diff --git a/php/nochan.php b/php/nochan.php index 03a09271..00b37ded 100755 --- a/php/nochan.php +++ b/php/nochan.php @@ -9,11 +9,11 @@ $dir = scandir('./lists'); $channels = array(); $all_channels = array(); $time = 60*60*24*4; //4 dager -$to = 0; +$to = 60*60*24*2; foreach($dir as $files){ if(strpos($files, '.json') !== FALSE){ $time_lasted = time() - filemtime('./lists/'.$files); - if($time_lasted > $time) + if($time_lasted > $to) { clearstatcache(); $size = filesize('./lists/'.$files);