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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + Shadow opacity : 30, 15, 10, (8) + + Bevel opacity : 30 / 10 + Bevel opacity : 75 / 15 + + + + + 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 '
Paste here', substr($fullListFile[$_SESSION['cutFile']]['title'], 0, 22), '...
'; + echo '
Paste here', substr($fullListFile[$_SESSION['cutFile']]['title'], 0, 22), '...
'; } if (empty($listCurrentDir) && empty($listCurrentFile)) { if ($ci['ac'] === 'confDelDir' && isLog()) { @@ -230,6 +230,7 @@ if (!empty($ci['ac']) && $ci['ac'] === 'view' && !empty($listCurrentFile)) { Cut this video Use this thumbnail for folder thumbnail Delete this video + Re-download '; } if ($GLOBALS['config']['DOWNLOAD_METHOD'] === 'xsendfile' || $GLOBALS['config']['DOWNLOAD_METHOD'] === 'php') { @@ -267,13 +268,13 @@ if (!empty($ci['ac']) && $ci['ac'] === 'view' && !empty($listCurrentFile)) { ', $videoInfo['size'], ' Publish date - ', date("d m Y", strtotime($videoInfo['uploadDate'])), ' + ', date("d m Y", strtotime($videoInfo['uploadDate'])), ' 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 = '') {
'; echo ' - ', basename($aBackTrace[0]['file']), ' ligne => ', $aBackTrace[0]['line'], ' + ', basename($aBackTrace[0]['file']), ' ligne => ', $aBackTrace[0]['line'], ' '; - echo '
',       htmlentities(print_r($data, 1)), '
'; + echo '
',        htmlentities(print_r($data, 1)), '
'; echo '

'; @@ -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']);