From 1b65668acfc7bec3d961d54a99db8950f8d8115e Mon Sep 17 00:00:00 2001 From: Horus3 Date: Mon, 15 Sep 2014 02:02:19 +0200 Subject: 'check back later' message for audio extraction added. --- dl.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dl.php b/dl.php index 3fd0753..3ae986c 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('
', 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);
--
cgit v1.2.3