Update dl.php

This commit is contained in:
Roman Kelesidis 2024-09-16 21:39:52 +07:00
commit 26d5feffa5

6
dl.php
View file

@ -105,7 +105,11 @@ if ($thumbnail) {
// Re-define $attachment['physical_filename'] for thumbnails // Re-define $attachment['physical_filename'] for thumbnails
$attachment['physical_filename'] = THUMB_DIR . '/t_' . $attachment['physical_filename']; $attachment['physical_filename'] = THUMB_DIR . '/t_' . $attachment['physical_filename'];
} elseif ($m3u) { } elseif ($m3u) {
$attachment['physical_filename'] = ''; // TODO: m3u file path // Check m3u file exist
if (!$m3uFile = (new \TorrentPier\TorrServerAPI())->getM3UPath($m3u)) {
bb_die($lang['ERROR_NO_ATTACHMENT']);
}
$attachment['physical_filename'] = basename($m3uFile);
} }
DB()->sql_freeresult($result); DB()->sql_freeresult($result);