GithubHelp home page GithubHelp logo

daveeeh / transdroid-search Goto Github PK

View Code? Open in Web Editor NEW

This project forked from erickok/transdroid-search

0.0 1.0 0.0 532 KB

Cross-app torrent search results provider for Android

License: GNU Lesser General Public License v3.0

Java 100.00%

transdroid-search's Introduction

transdroid-search

Transdroid Torrent Search is an Android application that provides torrent search results to other Android apps by exposing ContentProviders. Originally part of Transdroid, it now supplies torrent links for 20+ public and private torrent sites to various torrent-related Android applications.

The latest .apk is available via transdroid.org/latest-search and code is available under the Lesser GPL v3 license.

Usage

Transdroid Torrent Search provides access to torrent searches on a variety of sites. Instead of providing an interface itself, it allows Android application to access the data via a content provider.

Getting search results

Acquiring search results for a specific query can be as easy as as two lines of code:

Uri uri = Uri.parse("content://org.transdroid.search.torrentsearchprovider/search/" + query);
Cursor results = managedQuery(uri, null, null, null, null);

The returned Cursor can be used in a ListActivity or elsewhere. The following fields are available in the returned cursor:

String[] fields = new String[] { "_ID", "NAME", "TORRENTURL", "DETAILSURL", "SIZE", "ADDED", "SEEDERS", "LEECHERS" };

Important: Querying the content providers is an synchronous operation. If done from your application's UI thread this operation will stall the interface. Use, for example, an AsyncTask to implement proper threading.

Customizing search results

You have control over the search results that are returned. A specific site may be queried and the preferred sort order can be given:

Uri uri = Uri.parse("content://org.transdroid.search.torrentsearchprovider/search/" + query);
Cursor results = managedQuery(uri, null, "SITE = ?", new String[] { siteCode }, sortOrder)

Here, siteCode is the code of one of the supported torrent sites. The default is Mininova. The orderCode is either BySeeders (default) or Combined. Note that no errors are returned when a site or sort order doesn't exist (although they are written to LogCat); an null Cursor is returned instead. (This is a limitation of ContentResolvers.)

Supported torrent sites

To get a listing of (the codes of) the support torrent sites, you may use another provider:

uri = Uri.parse("content://org.transdroid.search.torrentsitesprovider/sites");
Cursor sites = managedQuery(uri, null, null, null, null);

The returned Cursor contains the following fields:

String[] fields = new String[] { "_ID", "CODE", "NAME", "RSSURL" };

Developed By

  • Eric Kok (Original developer) [email protected]
  • Steve Garon
  • Gabor Tanka
  • Eric Taix
  • John Conrad
  • Toon Schoenmakers
  • Gabor Foldvari
  • Marco Furlando
  • Mário Franco
  • Martin Piffault
  • Colby Brown
  • and others...

License

Copyright 2010-2013 Eric Kok et al.

Transdroid Torrent Search is free software: you can redistribute 
it and/or modify it under the terms of the GNU Lesser General 
Public License as published by the Free Software Foundation, 
either version 3 of the License, or (at your option) any later 
version.

Transdroid Torrent Search is distributed in the hope that it will 
be useful, but WITHOUT ANY WARRANTY; without even the implied 
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public 
License along with Transdroid.  If not, see <http://www.gnu.org/licenses/>.

Some code/libraries are used in the project:

  • RssParser (learning-android) by Tane Piper (Public Domain)

transdroid-search's People

Contributors

erickok avatar johnconrad avatar t-gabor avatar mpiffault avatar colbybrown242 avatar eric-kok-ezeeworld avatar lightglitch avatar schoentoon avatar gfoldv avatar

Watchers

David Hodges avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.