diff options
| author | root | 2014-09-15 15:06:05 +0200 |
|---|---|---|
| committer | root | 2014-09-15 15:06:05 +0200 |
| commit | a79e2e26f6aeb008058d043209c0b8535f20b659 (patch) | |
| tree | 266748f9d5eb592ef6f5740dc007bd1ab82220ef | |
| parent | b44a26eb73010260922d242875a3b4773936a084 (diff) | |
| parent | 1b65668acfc7bec3d961d54a99db8950f8d8115e (diff) | |
| download | video-dl-a79e2e26f6aeb008058d043209c0b8535f20b659.tar.gz | |
Merge branch 'master' of git.iamfabulous.de:bootstrap-video-dl
| -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); |
