summaryrefslogtreecommitdiff
path: root/src/torrent.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-04-12 10:54:29 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-04-12 10:54:29 +0000
commit42eddac0e9f0216175fef223fd9b1023ed502a6e (patch)
tree7fd853c8fdabc678bc1df0f4eb5160420347ac8e /src/torrent.c
parentf4a194f08d0c48641f5394cd07be61931a432241 (diff)
some quite significant changes to only receive/update recently-active torrents, if enabled. also use a hash table and tree row references for lookup. hopefully performance will be much better for people with large number of torrents.
Diffstat (limited to 'src/torrent.c')
-rw-r--r--src/torrent.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/torrent.c b/src/torrent.c
index 3c6f0d4..4c35e06 100644
--- a/src/torrent.c
+++ b/src/torrent.c
@@ -265,6 +265,14 @@ const gchar *tracker_get_scrape(JsonObject * t)
return json_object_get_string_member(t, FIELD_SCRAPE);
}
+JsonArray *get_torrents_removed(JsonObject *response)
+{
+ if (G_UNLIKELY(json_object_has_member(response, FIELD_REMOVED)))
+ return json_object_get_array_member(response, FIELD_REMOVED);
+ else
+ return NULL;
+}
+
JsonArray *get_torrents(JsonObject * response)
{
return json_object_get_array_member(response, FIELD_TORRENTS);