Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST] Automatically add new torrent requests #15

Open
QuixThe2nd opened this issue Feb 25, 2020 · 5 comments
Open

[REQUEST] Automatically add new torrent requests #15

QuixThe2nd opened this issue Feb 25, 2020 · 5 comments

Comments

@QuixThe2nd
Copy link

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

@Wiilf
Copy link

Wiilf commented Aug 27, 2020

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

@QuixThe2nd
Copy link
Author

How would you go about getting the torrent metadata?

@Wiilf
Copy link

Wiilf commented Aug 29, 2020

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

@QuixThe2nd
Copy link
Author

Add torrent to database.

@Wiilf
Copy link

Wiilf commented Sep 13, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants