diff --git a/images/reload.svg b/images/reload.svg
new file mode 100644
index 0000000..416cc3f
--- /dev/null
+++ b/images/reload.svg
@@ -0,0 +1,534 @@
+
+
+
+
diff --git a/inc/content.php b/inc/content.php
index 8aa4a95..c9a30f3 100644
--- a/inc/content.php
+++ b/inc/content.php
@@ -141,7 +141,7 @@ if (!empty($breadcrumb)) {
}
echo '';
if (isset($_SESSION['cutFile']) && !empty($_SESSION['cutFile'])) {
- echo '
Via |
';
if (!empty($videoInfo['via'])) {
- echo '', $videoInfo['via'], '';
+ echo '', $videoInfo['via'], '';
} else {
echo '';
}
diff --git a/index.php b/index.php
index 054551b..b5030e7 100644
--- a/index.php
+++ b/index.php
@@ -277,9 +277,9 @@ function n_print($data, $name = '') {
';
@@ -348,7 +348,7 @@ function addVideo($ci, $fullListFile) {
} else {
$path = '';
}
- if(isset($ci['ddl']) && (int)$ci['ddl'] === 1){
+ if (isset($ci['ddl']) && (int)$ci['ddl'] === 1) {
$ddl = 1;
} else {
$ddl = 0;
@@ -365,6 +365,12 @@ function addVideo($ci, $fullListFile) {
file_put_contents($GLOBALS['config']['LISTFILE'], "");
}
+function redownloadVideo($bc, $file){
+ $path = $GLOBALS['config']['VIDEODIR'].'/'.chunk_split($bc, 8, '/');
+ $pathAndFile = $path.$file;
+ rename($pathAndFile.'.hash', $GLOBALS['config']['TMPDIR'].'/'.$file.'.hash');
+}
+
function deleteVideo($bc, $file) {
$path = $GLOBALS['config']['VIDEODIR'].'/'.chunk_split($bc, 8, '/');
$pathAndFile = $path.$file;
@@ -486,7 +492,7 @@ function makeRss($breadcrumb, $fullListFile) {
http://'.$_SERVER['HTTP_HOST'].'';
foreach ($allFile as $value) {
$oriValues = $value;
- $hash = substr(str_replace('.webm','',$oriValues),-10, 10);
+ $hash = substr(str_replace('.webm', '', $oriValues), -10, 10);
$rss .= '
-
'.html_entity_decode($fullListFile[$hash]['title'], ENT_QUOTES, "UTF-8").'
@@ -522,8 +528,8 @@ function getVideoInfo($file, $dir, $fullListFile) {
$size = $jsonSize[0].'x'.$jsonSize[1];
$time = gmdate('H\hi\ms\s', $jsonInfo -> duration);
$uploadDate = htmlentities($jsonInfo -> upload_date, ENT_QUOTES, "UTF-8");
- if(empty($uploadDate)){
- $uploadDate = gmdate ("Ymd", filemtime($GLOBALS['config']['VIDEODIR']."/".$path.$file.".webm"));
+ if (empty($uploadDate)) {
+ $uploadDate = gmdate("Ymd", filemtime($GLOBALS['config']['VIDEODIR']."/".$path.$file.".webm"));
}
$info = array(
'hash' => $file,
@@ -788,6 +794,13 @@ if (isset($ci['ac']) && !empty($ci['ac'])) {
die('Tinker say : Blinded you, with Science! ');
}
cutVideo($ci['bc'], $ci['file']);
+ }
+ if ($ci['ac'] === 'view' && !empty($ci['op']) && $ci['op'] === 'reDownload') {
+ verifToken($ci['token']);
+ if (!isLog()) {
+ die('Tinker say : Blinded you, with Science! ');
+ }
+ reDownloadVideo($ci['bc'], $ci['file']);
}
if ($ci['ac'] === 'viewQueue' || $ci['ac'] === 'clearCache') {
verifToken($ci['token']);
|