[fix] delete cache after add video
[fix] delete cahce after update video title or video date add
This commit is contained in:
parent
e32e499c8f
commit
4cedc1d814
|
@ -1,6 +1,7 @@
|
|||
#!/bin/bash/
|
||||
finalDest=/path/of/sovigall/videos/
|
||||
tempDest=/path/of/sovigall/tmp/
|
||||
pageCache=/path/of/sovigall/pagecache/
|
||||
threads=3 # nb cpu core - 1
|
||||
cd $tempDest
|
||||
|
||||
|
@ -30,5 +31,5 @@ do
|
|||
done < $file
|
||||
fi
|
||||
done
|
||||
|
||||
rm $pageCache*.html
|
||||
# -rc_lookahead 16 -g 360 -threads 3
|
||||
|
|
|
@ -186,7 +186,9 @@ if (!empty($ci['ac']) && $ci['ac'] === 'view' && !empty($listCurrentFile)) {
|
|||
$fullTitle = $videoInfo['originalTitle'];
|
||||
$uploadDate = $videoInfo['uploadDate'];
|
||||
updateFileInfo($videoInfo['hash'], $fullTitle, $uploadDate);
|
||||
deleteCache($ci['bc'], $ci['file'], $ci['sort']);
|
||||
$videoInfo['title'] = $fullTitle = $videoInfo['originalTitle'].' ('.$videoInfo['originalTitle'].')';
|
||||
$videoInfo['uploadDateSort'] = $videoInfo['uploadDate'];
|
||||
deleteCache($ci['bc'], $ci['file'], $ci['sort'],true);
|
||||
} else {
|
||||
$fullTitle = $videoInfo['title'].' ('.$videoInfo['originalTitle'].')';
|
||||
}
|
||||
|
|
10
index.php
10
index.php
|
@ -560,10 +560,11 @@ function deleteCache($bc = '', $file = '', $sort = '', $parent = false) {
|
|||
unlink($_SERVER['DOCUMENT_ROOT'].'/'.$GLOBALS['config']['PAGECACHE'].'/'.$cacheFile.'.html');
|
||||
}
|
||||
if ($parent === true) {
|
||||
$parent = substr($bc, 0, -8);
|
||||
$cacheParent = md5($parent.$file.$sort);
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].'/', $GLOBALS['config']['PAGECACHE'].'/'.$cacheParent.'.html')) {
|
||||
unlink($_SERVER['DOCUMENT_ROOT'].'/', $GLOBALS['config']['PAGECACHE'].'/'.$cacheParent.'.html');
|
||||
unset ($file);
|
||||
unset ($sort);
|
||||
$cacheParent = md5($bc.$file.$sort);
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'].'/'.$GLOBALS['config']['PAGECACHE'].'/'.$cacheParent.'.html')) {
|
||||
unlink($_SERVER['DOCUMENT_ROOT'].'/'.$GLOBALS['config']['PAGECACHE'].'/'.$cacheParent.'.html');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -609,6 +610,7 @@ if (isset($ci['ac']) && !empty($ci['ac'])) {
|
|||
verifToken($ci['token']);
|
||||
$addVideo = addVideo($ci, $fullListFile);
|
||||
deleteCache($ci['bc'], $ci['file'], $ci['sort']);
|
||||
unset($ci['ac']);
|
||||
}
|
||||
if ($ci['ac'] === 'addThumbnail' && !empty($ci['op']) && (int)$ci['op'] === 1) {
|
||||
verifToken($ci['token']);
|
||||
|
|
Loading…
Reference in New Issue