summaryrefslogtreecommitdiff
path: root/src/trg-torrent-model.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-09-26 17:35:12 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-09-26 17:35:12 +0000
commit0a8310af38022a5794c6ec8f0b5a6e745debfdea (patch)
treeb0bb645f30393f00562e3b1f8f876a76f017125a /src/trg-torrent-model.c
parent167799dd240e946ca94f3cc01ded1b90f69be0fd (diff)
issue 129, issue 130
Diffstat (limited to 'src/trg-torrent-model.c')
-rw-r--r--src/trg-torrent-model.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/trg-torrent-model.c b/src/trg-torrent-model.c
index 90d9d6f..8959027 100644
--- a/src/trg-torrent-model.c
+++ b/src/trg-torrent-model.c
@@ -264,10 +264,6 @@ update_torrent_iter(TrgTorrentModel * model, gint64 rpcv, gint64 serial,
statusIcon = torrent_get_status_icon(rpcv, newFlags);
pf = torrent_get_peersfrom(t);
trackerStats = torrent_get_tracker_stats(t);
- if (json_array_get_length(trackerStats) > 0) {
- JsonObject *firstTracker = json_array_get_object_element(trackerStats, 0);
- firstTrackerHost = trg_gregex_get_first(priv->urlHostRegex, tracker_stats_get_host(firstTracker));
- }
gtk_tree_model_get(GTK_TREE_MODEL(model), iter,
TORRENT_COLUMN_FLAGS, &lastFlags,
@@ -275,6 +271,11 @@ update_torrent_iter(TrgTorrentModel * model, gint64 rpcv, gint64 serial,
json_object_ref(t);
+ if (json_array_get_length(trackerStats) > 0) {
+ JsonObject *firstTracker = json_array_get_object_element(trackerStats, 0);
+ firstTrackerHost = trg_gregex_get_first(priv->urlHostRegex, tracker_stats_get_host(firstTracker));
+ }
+
#ifdef DEBUG
gtk_list_store_set(ls, iter, TORRENT_COLUMN_ICON, statusIcon, -1);
gtk_list_store_set(ls, iter,