Browse Source

bug fix for mp3 file get

master
filesite 5 months ago
parent
commit
3ab624df51
  1. 6
      themes/beauty/controller/SiteController.php

6
themes/beauty/controller/SiteController.php

@ -100,7 +100,7 @@ Class SiteController extends Controller { @@ -100,7 +100,7 @@ Class SiteController extends Controller {
$cacheKey = $this->getCacheKey('root', 'mp3', $maxScanDeep);
$mp3File = Common::getCacheFromFile($cacheKey);
if (empty($mp3File)) {
$mp3File = $scanner->getDefaultFile('mp3', $defaultCateId);
$mp3File = $scanner->getDefaultFile('mp3');
if (!empty($mp3File)) {
Common::saveCacheToFile($cacheKey, $mp3File);
}
@ -126,7 +126,7 @@ Class SiteController extends Controller { @@ -126,7 +126,7 @@ Class SiteController extends Controller {
return $this->render($viewName, $params, $pageTitle);
}
//TODO: 清空所有缓存
//清空所有缓存
public function actionCleancache() {
$code = 1;
$msg = 'OK';
@ -136,7 +136,7 @@ Class SiteController extends Controller { @@ -136,7 +136,7 @@ Class SiteController extends Controller {
$files = scandir($cacheDir);
foreach($files as $file) {
if (!preg_match('/\.json$/i', $file)) {continue;}
unlink("{$cacheDir}{$file}");
}
}catch(Exception $e) {

Loading…
Cancel
Save