Browse Source

remove duplicates from announcement list

main
ghost 1 year ago
parent
commit
c70205e204
  1. 16
      src/Controller/TorrentController.php

16
src/Controller/TorrentController.php

@ -2253,15 +2253,25 @@ class TorrentController extends AbstractController
} }
} }
// Format announce list // Remove duplicates in list
$trackers = []; $values = [];
foreach ($announceList[0] as $value) foreach ($announceList[0] as $value)
{ {
$trackers[] = [$value]; $values[] = $value;
} }
foreach ($announceList[1] as $value) foreach ($announceList[1] as $value)
{
$values[] = $value;
}
$values = array_unique($values);
// Format announce list
$trackers = [];
foreach ($values as $value)
{ {
$trackers[] = [$value]; $trackers[] = [$value];
} }

Loading…
Cancel
Save