summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot2014-09-15 15:06:05 +0200
committerroot2014-09-15 15:06:05 +0200
commita79e2e26f6aeb008058d043209c0b8535f20b659 (patch)
tree266748f9d5eb592ef6f5740dc007bd1ab82220ef
parentb44a26eb73010260922d242875a3b4773936a084 (diff)
parent1b65668acfc7bec3d961d54a99db8950f8d8115e (diff)
downloadvideo-dl-a79e2e26f6aeb008058d043209c0b8535f20b659.tar.gz
Merge branch 'master' of git.iamfabulous.de:bootstrap-video-dl
-rw-r--r--dl.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/dl.php b/dl.php
index 0cf9f59..a94d068 100644
--- a/dl.php
+++ b/dl.php
@@ -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);