(trunk) add tr_torrent_stat.id to RPC documentation. Rename tr_tracker_stat.identifier as tr_tracker_stat.id for consistency with tr_torrent.id
This commit is contained in:
parent
73f4d29ce3
commit
a77770a51a
|
@ -245,9 +245,10 @@
|
|||
-------------------+--------------------------------------+
|
||||
trackers | array of objects, each containing: |
|
||||
+-------------------------+------------+
|
||||
| announce | string | tr_info
|
||||
| scrape | string | tr_info
|
||||
| tier | number | tr_info
|
||||
| announce | string | tr_tracker_info
|
||||
| scrape | string | tr_tracker_info
|
||||
| tier | number | tr_tracker_info
|
||||
| id | number | tr_tracker_info
|
||||
-------------------+--------------------------------------+
|
||||
trackerStats | array of objects, each containing: |
|
||||
+-------------------------+------------+
|
||||
|
|
|
@ -776,7 +776,7 @@ addTorrentToTier( tr_announcer * announcer, tr_torrent_tiers * tiers, tr_torrent
|
|||
tr_ptrArrayAppend( &tiers->tiers, tier );
|
||||
}
|
||||
|
||||
tierAddTracker( announcer, tier, info->announce, info->scrape, info->identifier );
|
||||
tierAddTracker( announcer, tier, info->announce, info->scrape, info->id );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* This file Copyright (C) 2009-2010 Mnemosyne LLC
|
||||
trackers[trackerCount].id = 0;
|
||||
*
|
||||
* This file is licensed by the GPL version 2. Works owned by the
|
||||
* Transmission project are granted a special exemption to clause 2(b)
|
||||
|
@ -294,7 +295,7 @@ getannounce( tr_info * inf, tr_benc * meta )
|
|||
t->tier = validTiers;
|
||||
t->announce = tr_strdup( url );
|
||||
t->scrape = tr_convertAnnounceToScrape( url );
|
||||
t->identifier = trackerCount;
|
||||
t->id = trackerCount;
|
||||
|
||||
anyAdded = TRUE;
|
||||
++trackerCount;
|
||||
|
@ -326,7 +327,7 @@ getannounce( tr_info * inf, tr_benc * meta )
|
|||
trackers[trackerCount].tier = 0;
|
||||
trackers[trackerCount].announce = tr_strdup( url );
|
||||
trackers[trackerCount].scrape = tr_convertAnnounceToScrape( url );
|
||||
trackers[trackerCount].identifier = 0;
|
||||
trackers[trackerCount].id = 0;
|
||||
trackerCount++;
|
||||
/*fprintf( stderr, "single announce: [%s]\n", url );*/
|
||||
}
|
||||
|
@ -599,7 +600,7 @@ tr_metainfoSetFromMagnet( tr_info * inf, const tr_magnet_info * m )
|
|||
inf->trackers[i].tier = i;
|
||||
inf->trackers[i].announce = tr_strdup( url );
|
||||
inf->trackers[i].scrape = tr_convertAnnounceToScrape( url );
|
||||
inf->trackers[i].identifier = i;
|
||||
inf->trackers[i].id = i;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -361,7 +361,7 @@ addTrackers( const tr_info * info,
|
|||
const tr_tracker_info * t = &info->trackers[i];
|
||||
tr_benc * d = tr_bencListAddDict( trackers, 4 );
|
||||
tr_bencDictAddStr( d, "announce", t->announce );
|
||||
tr_bencDictAddInt( d, "identifier", t->identifier );
|
||||
tr_bencDictAddInt( d, "id", t->id );
|
||||
tr_bencDictAddStr( d, "scrape", t->scrape );
|
||||
tr_bencDictAddInt( d, "tier", t->tier );
|
||||
}
|
||||
|
|
|
@ -1208,7 +1208,7 @@ typedef struct tr_tracker_info
|
|||
int tier;
|
||||
char * announce;
|
||||
char * scrape;
|
||||
uint32_t identifier; /* used to match to a tr_tracker_stat */
|
||||
uint32_t id; /* unique identifier used to match to a tr_tracker_stat */
|
||||
}
|
||||
tr_tracker_info;
|
||||
|
||||
|
|
|
@ -631,12 +631,12 @@ int trashDataFile(const char * filename)
|
|||
for (NSUInteger i=0; i < oldTrackerCount; ++i)
|
||||
{
|
||||
trackerStructs[i] = fInfo->trackers[i];
|
||||
trackerStructs[i].identifier = i;
|
||||
trackerStructs[i].id = i;
|
||||
}
|
||||
|
||||
trackerStructs[oldTrackerCount].announce = (char *)[tracker UTF8String];
|
||||
trackerStructs[oldTrackerCount].tier = trackerStructs[oldTrackerCount-1].tier + 1;
|
||||
trackerStructs[oldTrackerCount].identifier = oldTrackerCount;
|
||||
trackerStructs[oldTrackerCount].id = oldTrackerCount;
|
||||
|
||||
const BOOL success = tr_torrentSetAnnounceList(fHandle, trackerStructs, oldTrackerCount+1);
|
||||
tr_free(trackerStructs);
|
||||
|
@ -652,10 +652,10 @@ int trashDataFile(const char * filename)
|
|||
NSUInteger newCount = 0;
|
||||
for (NSUInteger i = 0; i < fInfo->trackerCount; i++)
|
||||
{
|
||||
if (![removeIdentifiers containsIndex: fInfo->trackers[i].identifier])
|
||||
if (![removeIdentifiers containsIndex: fInfo->trackers[i].id])
|
||||
{
|
||||
trackerStructs[newCount] = fInfo->trackers[i];
|
||||
trackerStructs[newCount].identifier = newCount++;
|
||||
trackerStructs[newCount].id = newCount++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
|
||||
- (NSUInteger) identifier
|
||||
{
|
||||
return fStat.identifier;
|
||||
return fStat.id;
|
||||
}
|
||||
|
||||
- (NSInteger) totalSeeders
|
||||
|
|
Loading…
Reference in New Issue