SuprDewd / simpletracker

A minimal BitTorrent tracker written in PHP
MIT License
34 stars 13 forks source link

Error in make a peer "leecher" #21

Open tachyon3000 opened 3 years ago

tachyon3000 commented 3 years ago

The announce file put all in status completed=1 on the database, but the lechers or in status completed=0 don't be added, so they can't download nothing, can you fixed it? my server run nginx with php 7.4 and mysqlnd 7.4.3

sorry with my bad english.

Wiilf commented 2 years ago

You need to review your SELECT statement, ensuring the user ID exists in database.

From there you want to check if seeder and propose a UPDATE or INSERT based on that. From there you do your usual logic and get to the peer data part of it. Once you sorted out the fields.

This announce script does literally everything for us. It's feature packed and will take anyone enough time to achieve that reading the BitTorrent spec/BEPs.