Added TorrServer instance support! 🎞 (#1603)

* Added integration with TorrServe 🎞

* Updated

* Updated

* Update functions.php

* Updated

* Update functions.php

* Update functions.php

* Updated

* Update TorrServerAPI.php

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Update TorrServerAPI.php

* Update TorrServerAPI.php

* Update TorrServerAPI.php

* Updated

* Updated

* Update config.php

* Update Attach.php

* Update Torrent.php

* Update CHANGELOG.md

* Update TorrServerAPI.php

* Update TorrServerAPI.php

* Update displaying_torrent.php

* Update Torrent.php

* Update TorrServerAPI.php

* Update TorrServerAPI.php

* Update TorrServerAPI.php

* Update TorrServerAPI.php

* Update TorrServerAPI.php

* Updated

* Update viewtopic_attach.tpl

* Updated

* Update tor_m3u_format.svg

* Updated

* Updated

* Update tor_m3u_format.png

* Update TorrServerAPI.php

* Update TorrServerAPI.php

* Updated

* Update Torrent.php

* Update functions_delete.php

* Updated

* Update TorrServerAPI.php

* Updated

* Updated

* Updated

* Update TorrServerAPI.php

* Update TorrServerAPI.php

* Update displaying_torrent.php

* Update TorrServerAPI.php

* Update CHANGELOG.md

Co-Authored-By: YouROK <4067300+yourok@users.noreply.github.com>

---------

Co-authored-by: YouROK <4067300+yourok@users.noreply.github.com>
This commit is contained in:
Roman Kelesidis 2024-08-20 22:16:49 +07:00 committed by GitHub
commit c6b4672734
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 344 additions and 5 deletions

View file

@ -144,6 +144,13 @@ if ($check_attachments) {
$orphan_db_attach[] = $row['attach_id'];
}
// Delete all orphan attachments
if ($bb_cfg['torr_server']['enabled']) {
foreach ($orphan_db_attach as $attach_id) {
// TorrServer integration
$torrServer = new \TorrentPier\TorrServerAPI();
$torrServer->removeM3U($attach_id);
}
}
if ($orphans_sql = implode(',', $orphan_db_attach)) {
if ($fix_errors) {
DB()->query("DELETE FROM " . BB_ATTACHMENTS_DESC . " WHERE attach_id IN($orphans_sql)");