From a736da57f084017ac17e06cd9db19b1fd166e1a6 Mon Sep 17 00:00:00 2001 From: yo mama Date: Sat, 4 Apr 2015 01:11:47 -0700 Subject: first --- protected/Cache.php | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 protected/Cache.php (limited to 'protected/Cache.php') diff --git a/protected/Cache.php b/protected/Cache.php new file mode 100755 index 0000000..9a2d46e --- /dev/null +++ b/protected/Cache.php @@ -0,0 +1,50 @@ +urlToId($url); + + if(file_exists(Settings::$CachePath . $id . ".part")){ + return false; + } + + $speed = Settings::$CacheDownloadMaxSpeed; + $r = ""; + if($speed){ + $r = " -r $speed "; + } + + $command = Settings::$YoutubeDlCommand . " $r -o '" . Settings::$CachePath . "$id" . "' $url"; + + $output = exec($command); + echo "$output"; + + } + +} \ No newline at end of file -- cgit v1.2.3-70-g09d2