Add source hash comparator & refactor download lock

This commit is contained in:
crazywhalecc
2025-06-14 16:09:48 +08:00
committed by Jerry Ma
parent 8fbe6ee8ff
commit 5a401a5f92
10 changed files with 142 additions and 37 deletions

View File

@@ -60,7 +60,7 @@ class DeleteDownloadCommand extends BaseCommand
foreach ($deleted_sources as $lock_name) {
// remove download file/dir if exists
if ($lock[$lock_name]['source_type'] === 'archive') {
if ($lock[$lock_name]['source_type'] === SPC_SOURCE_ARCHIVE) {
if (file_exists($path = FileSystem::convertPath(DOWNLOAD_PATH . '/' . $lock[$lock_name]['filename']))) {
logger()->info('Deleting file ' . $path);
unlink($path);