summaryrefslogtreecommitdiff
path: root/dl.php
diff options
context:
space:
mode:
Diffstat (limited to 'dl.php')
-rw-r--r--dl.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/dl.php b/dl.php
index 3fd0753..0cf9f59 100644
--- a/dl.php
+++ b/dl.php
@@ -120,7 +120,7 @@ switch($_GET["task"]){
case("stream"):
ignore_user_abort(true);
if(file_exists($CACHEDIR."/".$info[2].".txt"))
- failure('<h3>Already processing the request. Check back later.</h3><br><p>This is very cpu intensive operation, so thanks for your understanding.</p><br><img src="/static/ajax-loader.gif" alt="ajax-loader"/>', false);
+ failure('<h3>Stream: Already processing the request.</h3><p>This page will refresh when the task is done.</p><br><img src="/static/ajax-loader.gif" alt="ajax-loader"/>', false);
# send 'cached' response in case we already have the video on disk
if(file_exists($CACHEDIR."/".$info[2]) && !file_exists($CACHEDIR."/".$info[2].".txt")){
echo "cached";
@@ -151,20 +151,20 @@ switch($_GET["task"]){
}
*/
if(file_exists($CACHEDIR."/".$info[2].".webm.txt"))
- failure('<h3>Already processing the request. Check back later.</h3><br><p>( This is very cpu intensive operation, so thanks for your understanding. )</p><br><img src="/static/ajax-loader.gif" alt="ajax-loader"/>', false);
+ failure('<h3>Convert: Already processing the request.</h3><p>This page will refresh when the task is done.</p><br><p>( This is a very cpu intensive operation, so it may take a while. )</p><br><img src="/static/ajax-loader.gif" alt="ajax-loader"/>', false);
if(file_exists($CACHEDIR."/".$info[2]."webm")){
echo "cached";
exit;
} else {
- if(!convert_video($CACHEDIR, $info[2]))
+ $finfo = new finfo(FILEINFO_MIME_TYPE);
+ $mime = $finfo->file($CACHEDIR . "/" . $info[2]);
+
+ if(!convert_video($CACHEDIR, $info[2], $mime))
failure("Converting video failed.", false);
else
unlink($CACHEDIR."/".$info[2].".webm.txt");
}
- $finfo = new finfo(FILEINFO_MIME_TYPE);
- $mime = $finfo->file($CACHEDIR . "/" . $info[2]);
-
pr_player(htmlentities($CACHEDIR . "/" . $info[2]), htmlentities($info[4]), htmlentities($mime), htmlentities($info[1]), htmlentities($info[2]), true);
break;