diff options
| author | moehm | 2014-09-14 21:29:39 +0200 |
|---|---|---|
| committer | moehm | 2014-09-14 21:29:39 +0200 |
| commit | f4c4a9791a90c51b1699d5d178199318a2ca2a85 (patch) | |
| tree | ab0b0de6ec10cc9baa4cd31875a7fba1e1b24610 /dl.php | |
| parent | 1eba482c5172a92432c13e04480cb1604bef6df0 (diff) | |
| download | video-dl-f4c4a9791a90c51b1699d5d178199318a2ca2a85.tar.gz | |
removed limit for downloads + blocks double audio extracting
Diffstat (limited to 'dl.php')
| -rw-r--r-- | dl.php | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -81,6 +81,7 @@ switch($_GET["task"]){ break; case("xtau"): /* extracting audio */ + ignore_user_abort(true); # get file information exec("youtube-dl -x --get-filename --output ".escapeshellarg($CACHEDIR."/".$info[2].".%(ext)s") . " ".escapeshellarg($info[0]), $output, $ret); if($ret != 0) @@ -89,10 +90,12 @@ switch($_GET["task"]){ # file name with correct extension, but cache dir at first $file = $output[0]; - if(!file_exists($file)){ + if(!file_exists($file) || !file_exists($CACHEDIR."/".$info[2].".audio.txt")){ $ret = video_xt_audio($info[0], $CACHEDIR, $info[2]); if(!$ret) failure("Fetching the video failed.", true); + else + unlink($CACHEDIR."/".$info[2].".audio.txt"); } $finfo = new finfo(FILEINFO_MIME_TYPE); |
