simpletracker icon indicating copy to clipboard operation
simpletracker copied to clipboard

[REQUEST] Automatically add new torrent requests

Open QuixThe2nd opened this issue 4 years ago • 5 comments

If a torrent client announced from an unregistered torrent, automatically add it to the system.

QuixThe2nd avatar Feb 25 '20 12:02 QuixThe2nd

Easy. If torrent_id not found then add conditional if check with a INSERT statement to a new 'requests' table. In the works.

Wiilf avatar Aug 27 '20 22:08 Wiilf

How would you go about getting the torrent metadata?

QuixThe2nd avatar Aug 29 '20 11:08 QuixThe2nd

Do you mean add torrent to database or add torrent to client?

Wiilf avatar Aug 29 '20 11:08 Wiilf

Add torrent to database.

QuixThe2nd avatar Aug 30 '20 14:08 QuixThe2nd

I would consult an API (check the one on YTS) and retrieve the data and import into database. It's best to roster these requests into a separate table named 'requests' and cycle through the rows on a cron task, while querying the API for meta result.. then scrape that content as a INSERT to torrents table. You must handle BLOB data so utilizing the bencode class appropriately.

If no matching clause is retrieved from API endpoint, then torrent is not found and we continue; the iteration until complete. Be sure to remove matched request rows while retaining request rows for content not found.

Wiilf avatar Sep 13 '20 02:09 Wiilf