mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Exclude padding files (#260)
* Exclude padding files * Update CHANGELOG.md
This commit is contained in:
parent
8852eb1b4a
commit
ac402eda7d
@ -6,8 +6,9 @@
|
||||
**Merged pull requests:**
|
||||
|
||||
- Release v2.1.5-2023.09 🎉
|
||||
- Exclude padding files [\#260](https://github.com/torrentpier/torrentpier-lts/pull/260) ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky))
|
||||
- Added missing translation in admin_ug_auth [\#254](https://github.com/torrentpier/torrentpier-lts/pull/254) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Support for IDN domains [\#252](https://github.com/torrentpier/torrentpier-lts/pull/252) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Support for IDN domains [\#252](https://github.com/torrentpier/torrentpier-lts/pull/252) ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky))
|
||||
- Fixed cache directory auto-creating with SQLite [\#247](https://github.com/torrentpier/torrentpier-lts/pull/247) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Minor improvements [\#245](https://github.com/torrentpier/torrentpier-lts/pull/245), [\#246](https://github.com/torrentpier/torrentpier-lts/pull/246), [\#248](https://github.com/torrentpier/torrentpier-lts/pull/248), [\#249](https://github.com/torrentpier/torrentpier-lts/pull/249), [\#250](https://github.com/torrentpier/torrentpier-lts/pull/250), [\#251](https://github.com/torrentpier/torrentpier-lts/pull/251), [\#253](https://github.com/torrentpier/torrentpier-lts/pull/253), [\#255](https://github.com/torrentpier/torrentpier-lts/pull/255), [\#256](https://github.com/torrentpier/torrentpier-lts/pull/256), [\#257](https://github.com/torrentpier/torrentpier-lts/pull/257), [\#258](https://github.com/torrentpier/torrentpier-lts/pull/258), [\#259](https://github.com/torrentpier/torrentpier-lts/pull/259) ([belomaxorka](https://github.com/belomaxorka))
|
||||
|
||||
|
@ -103,6 +103,11 @@ class torrent
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// Exclude padding files [Only for hybrid torrents]
|
||||
if ((isset($f['attr']) ? $f['attr'] : null) === 'p')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
array_deep($f['path'], 'clean_tor_dirname');
|
||||
|
||||
$length = isset($f['length']) ? (float) $f['length'] : 0;
|
||||
|
@ -320,10 +320,14 @@ function tracker_register ($attach_id, $mode = '', $tor_status = TOR_NOT_APPROVE
|
||||
else if (isset($info['files']) && is_array($info['files']))
|
||||
{
|
||||
foreach ($info['files'] as $fn => $f)
|
||||
{
|
||||
// Exclude padding files [Only for hybrid torrents]
|
||||
if ((isset($f['attr']) ? $f['attr'] : null) !== 'p')
|
||||
{
|
||||
$totallen += (float) $f['length'];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return torrent_error_exit($lang['TORFILE_INVALID']);
|
||||
|
Loading…
Reference in New Issue
Block a user