mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fix for not going to next song after skip, and changed deletion timeframe to two days
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user