diff options
Diffstat (limited to 'dl.php')
| -rw-r--r-- | dl.php | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -85,6 +85,9 @@ switch($_GET["task"]){ case("xtau"): /* extracting audio */ ignore_user_abort(true); + if(file_exists($CACHEDIR."/".$info[2].".audio.txt")) + failure('<h3>Already processing the request. Check back later.</h3><br><img src="/static/ajax-loader.gif" alt="ajax-loader"/>', false); + # get file information exec("youtube-dl -x --get-filename --output ".escapeshellarg($CACHEDIR."/".$info[2].".%(ext)s") . " ".escapeshellarg($info[0]), $output, $ret); if($ret != 0) @@ -92,8 +95,8 @@ switch($_GET["task"]){ # file name with correct extension, but cache dir at first $file = $output[0]; - - if(!file_exists($file) || !file_exists($CACHEDIR."/".$info[2].".audio.txt")){ + + if(!file_exists($file)){ $ret = video_xt_audio($info[0], $CACHEDIR, $info[2]); if(!$ret) failure("Fetching the video failed.", true); |
