Skip to content

Commit

Permalink
Tiny readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
erickok committed Mar 22, 2019
1 parent 5e20530 commit c989282
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
transdroid-search
=================

Transdroid Torrent Search is an Android application that provides torrent search results to other Android apps by exposing `ContentProvider`s. Originally part of [Transdroid](http://www.transdroid.org), it now supplies torrent links for 20+ public and private torrent sites to various torrent-related Android applications.
Transdroid Torrent Search is an Android application that provides torrent search results to other Android apps by exposing `ContentProvider`s. Originally part of [Transdroid](http://www.transdroid.org), it now supplies torrent links for 15+ public and private torrent sites to various torrent-related Android applications.

The latest .apk is available via [transdroid.org/latest-search](http://transdroid.org/latest-search) and code is available under the Lesser GPL v3 license.

Expand All @@ -13,7 +13,7 @@ The latest .apk is available via [transdroid.org/latest-search](http://transdroi
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.
Transdroid Torrent Search provides access to torrent searches on a variety of sites. Instead of providing a search interface itself, it allows Android application to access the data via a content provider.

Getting search results
----------------------
Expand All @@ -29,22 +29,20 @@ The returned `Cursor` can be used in a `ListActivity` or elsewhere. The followin
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:
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 `ContentResolver`s.)
Here, `siteCode` is the code of one of the supported torrent sites. The default is `RARBG`. 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); a null `Cursor` is returned instead. (This is a limitation of `ContentResolver`s.)

Supported torrent sites
-----------------------

To get a listing of (the codes of) the support torrent sites, you may use another provider:
To get a listing of (the codes of) the support torrent sites, including custom RSS sites defined, you may use another provider:
```
uri = Uri.parse("content://org.transdroid.search.torrentsitesprovider/sites");
Cursor sites = managedQuery(uri, null, null, null, null);
Expand Down Expand Up @@ -76,7 +74,6 @@ Developed By
License
=======


Copyright 2010-2019 Eric Kok et al.

Transdroid Torrent Search is free software: you can redistribute
Expand Down

0 comments on commit c989282

Please sign in to comment.