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

Add support for custom Magnetico Sites #57

Open
lozbrown opened this issue Apr 21, 2017 · 11 comments
Open

Add support for custom Magnetico Sites #57

lozbrown opened this issue Apr 21, 2017 · 11 comments
Labels

Comments

@lozbrown
Copy link

Magnetico is an emerging project to essentially host your own torrent search engine

https://github.com/boramalper/magnetico

It would be useful to add my own (and maybe my friends) magnetico sites to transdroid so I could search and add the magnets to my torrent client from transdroid.

@boramalper
Copy link

Is there a protocol, format, or any kind of standards transdeoid-search requires or is it simply fine with custom solutions?

I'll probably implement a RESTful API with JSON formatted messages, but I'm open to suggestions for interoperability. =)

@erickok
Copy link
Owner

erickok commented Apr 21, 2017

No specific standard is required. Some use a json api (much preferred), some custom RSS feeds and some have to rely on html scraping. If you are yet to develop one, certainly go for a RESTful JSON API.

Interesting project BTW!

@ad-m
Copy link

ad-m commented Apr 23, 2017

@boramalper , see at "OpenAPI Specification" for recommendations how write API easy to use for general API interoperability.

@scriptzteam
Copy link

scriptzteam commented Apr 24, 2017

Done xD

Json-API with search and limit output (limit can be max. 100):
https://dht.bittor.ch/api?search=ubuntu&limit=3

Json-API latest 1000:
https://dht.bittor.ch/api

Base-page search:
https://dht.bittor.ch/?search=ubuntu

Base-RSS:
https://dht.bittor.ch/rss

Base-RSS search:
https://dht.bittor.ch/rss?search=ubuntu

Base-RSS search with limits number of output:
https://dht.bittor.ch/rss?search=ubuntu&limit=5

Basic magnet view:
https://dht.bittor.ch/?id=145916

Basic magnet files view:
https://dht.bittor.ch/?files=145916

Recently discovered files:
https://dht.bittor.ch/files

Stats page:
https://dht.bittor.ch/stats

@erickok
Copy link
Owner

erickok commented Apr 24, 2017

Just clicked on https://dht.bittor.ch/api?search=ubuntu&limit=3 but it doesn't seem to produce any valid JSON output though.

@erickok
Copy link
Owner

erickok commented Apr 24, 2017

Also, a sorting on at least the number of peers and/or availability would be good. The ubuntu search for example doesn't produce very useable results.

@boramalper
Copy link

boramalper commented Apr 24, 2017

I would definitely wait before using the API as it is not yet standardized across different magnetico web-interface implementations. I currently don't have time, but I'll discuss with @scriptzteam and possibly others to create a detailed specification of the API, which will ensure interoperability between different implementations. =)

@scriptzteam
Copy link

scriptzteam commented Apr 25, 2017

@erickok how not valid json ??

{
	"dht_results": [{"ID":"224352","NAME":"ubuntu-14.10-desktop-amd64.iso","MAGNET":"magnet:?xt=urn:btih:b415c913643e5ff49fe37d304bbb5e6e11ad5101&dn=ubuntu-14.10-desktop-amd64.iso","SIZE":"1.08GB","DISCOVERED":"2017-04-25 18:05:25" }, {"ID":"223681","NAME":"ubuntu-mate-14.04.2-LTS-desktop-amd64.iso","MAGNET":"magnet:?xt=urn:btih:f84b7654d35aa190a4c8bea3b64a92805641c961&dn=ubuntu-mate-14.04.2-LTS-desktop-amd64.iso","SIZE":"1.05GB","DISCOVERED":"2017-04-25 17:29:36" }, {"ID":"221435","NAME":"Ubuntu для начинающих 2015.pdf","MAGNET":"magnet:?xt=urn:btih:f53c73bd4b667f46e6a039a9888fba0eb23fae18&dn=Ubuntu+%D0%B4%D0%BB%D1%8F+%D0%BD%D0%B0%D1%87%D0%B8%D0%BD%D0%B0%D1%8E%D1%89%D0%B8%D1%85+2015.pdf","SIZE":"16.68MB","DISCOVERED":"2017-04-25 15:21:36" }, {}]}

http://jsonlint.com/ ---> Results ---> Valid JSON
https://jsonformatter.curiousconcept.com/ ---> Valid JSON (RFC 4627)
http://www.jsonschemavalidator.net/ ---> No errors found. JSON validates against the schema

Ubuntu search was just sample, you can always try https://dht.bittor.ch/api?search=rarbg ;)

Not possible for now to sort it by peers/availability as magnetico does not support it now :)

@boramalper will be more than happy to help on API :)

@erickok
Copy link
Owner

erickok commented Apr 25, 2017

Now it does but when I checked it didn't produce proper JSON. Maybe you were working on it?

I'll wait a bit until a standardized and documented API is fleshed out, if you don't mind.

@erickok
Copy link
Owner

erickok commented Mar 2, 2018

@boramalper
Copy link

Hey @erickok! I'd kindly suggest waiting for the v0.7.0 release before implementing it. In the meanwhile, any feedback would be greatly appreciated: boramalper/magnetico#162

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

No branches or pull requests

5 participants