mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Update
This commit is contained in:
parent
5dd6792568
commit
cc0d505e16
1 changed files with 1 additions and 1 deletions
|
@ -116,7 +116,7 @@ function cleanupDownloadsDirectory($resolution = 720)
|
|||
$filePath = $directory . '/' . $entry;
|
||||
|
||||
// Check if it's a file and does not match the resolution pattern (e.g., '480_.mp4')
|
||||
if (is_file($filePath) && !preg_match('/' . $resolution . '_\.mp4$/', $entry)) {
|
||||
if (is_file($filePath) && (preg_match('/' . $resolution . '_\.mp4$/', $entry) || empty(filesize($filePath)))) {
|
||||
// Attempt to delete the file
|
||||
if (unlink($filePath)) {
|
||||
_error_log("cleanupDownloadsDirectory: Deleted file: {$filePath}");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue