BitTorrent v2 support enhancements 🥳 (#876)

* BitTorrent v2 support enchancements

* Added torrent name sanitizing

* Using faster language construct instead of function call for name sanitizing

* Minor improvements

- Fixed deformed avatars => get_avatar() function
- Removed outdated dc links support

* Code comments

* Changed function name

* Added table generation function with file list

For search engines to index

* Used humn_size function for size formatting in table generation

* Fixed typo

* Removed useless language variables

* Fixed code formatting

* Fixed broken displaying magnet link

* Torrent fields sanitization in table

* Fixed info hash issue

* Support for v2 only torrents

* Code re-formatting

* Typo

* Update Torrent.php

* Update functions.php

* Updated

* Updated

* Update Torrent.php

* Update TorrentFileList.php

* Update Torrent.php

* Update Torrent.php

* Update Torrent.php

* Update Torrent.php

* Error msg

* Update Torrent.php

* Update Torrent.php

* Updated

* Update Torrent.php

* Update Torrent.php

* Update config.php

* Update mysql.sql

* Update mysql.sql

* Update mysql.sql

* Update mysql.sql

* Update mysql.sql

* String fixes

* Update TorrentFileList.php

---------

Co-authored-by: Roman Kelesidis <roman25052006.kelesh@gmail.com>
This commit is contained in:
Constantine Kovalensky 2023-09-02 21:55:21 +04:00 committed by GitHub
commit 50926639cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 139 additions and 85 deletions

View file

@ -291,7 +291,7 @@ CREATE TABLE IF NOT EXISTS `bb_bt_torrents`
`tor_type` TINYINT(1) NOT NULL DEFAULT '0',
`speed_up` INT(11) NOT NULL DEFAULT '0',
`speed_down` INT(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`info_hash`),
PRIMARY KEY (`topic_id`),
UNIQUE KEY `post_id` (`post_id`),
UNIQUE KEY `topic_id` (`topic_id`),
UNIQUE KEY `attach_id` (`attach_id`),