Transdroid Torrent Search 是一个 Android 应用程序,它通过公开ContentProvider
向其他 Android 应用程序提供 torrent 搜索结果。它最初是 Transdroid 的一部分,现在为 15 多个公共和私人 torrent 站点提供各种 torrent 相关 Android 应用程序的 torrent 链接。
最新的 .apk 可通过 transdroid.org/latest-search 获取,代码可在 Lesser GPL v3 许可证下获取。
Transdroid Torrent Search 提供对各种网站上的 torrent 搜索的访问。它本身不提供搜索界面,而是允许 Android 应用程序通过内容提供商访问数据。
获取特定查询的搜索结果只需两行代码即可简单:
Uri uri = Uri.parse("content://org.transdroid.search.torrentsearchprovider/search/" + query); Cursor results = managedQuery(uri, null, null, null, null);
返回的Cursor
可以在ListActivity
或其他地方使用。返回的游标中提供以下字段:
String[] fields = new String[] { "_ID", "NAME", "TORRENTURL", "DETAILSURL", "SIZE", "ADDED", "SEEDERS", "LEECHERS" };
可以查询特定站点并可以给出首选排序顺序:
Uri uri = Uri.parse("content://org.transdroid.search.torrentsearchprovider/search/" + query); Cursor results = managedQuery(uri, null, "SITE = ?", new String[] { siteCode }, sortOrder)
此处, siteCode
是受支持的 torrent 站点之一的代码。默认为RARBG
。 orderCode
是 BySeeders(默认)或 Combined。请注意,当站点或排序顺序不存在时,不会返回任何错误(尽管它们被写入 LogCat);相反,返回一个 null Cursor
。 (这是ContentResolver
的限制。)
要获取支持 torrent 站点(的代码)的列表,包括定义的自定义 RSS 站点,您可以使用其他提供商:
uri = Uri.parse("content://org.transdroid.search.torrentsitesprovider/sites"); Cursor sites = managedQuery(uri, null, null, null, null);
返回的Cursor
包含以下字段:
String[] fields = new String[] { "_ID", "CODE", "NAME", "RSSURL" };
Eric Kok(原始开发者)[email protected]
史蒂夫·加伦
加博·坦卡
埃里克·泰克斯
阿隆·艾伯特
约翰·康拉德
香椿舍恩梅克斯
加博·福尔德瓦里
马可·弗兰多
马里奥·佛朗哥
马丁·皮福
科尔比·布朗
托马斯·里卡迪
和其他人...
Copyright 2010-2019 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/>.
项目中用到了一些代码/库:
RssParser(学习-android),作者:Tane Piper(公共领域)
android-json-rpc by alexd (MIT 许可证)
Volley by Google(Apache 许可证 2.0)