Skip to content

Commit

Permalink
Issue #12 is wrong implemented
Browse files Browse the repository at this point in the history
The new updated code does not modified the variable FTrackerAddedByUserList.
The FTrackerAddedByUserList must always be the same when update all the torrent files one by one.

The wrong previeus commit 3de1c9d removed items from FTrackerAddedByUserList
This wrong code will only work:
	if updated for only one torrent or
	TrackerFromInsideOneTorrentFile does not contain tracker already present in FTrackerAddedByUserList
  • Loading branch information
GerryFerdinandus committed Feb 12, 2016
1 parent d7dc59b commit 0225684
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions source/code/main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1218,12 +1218,12 @@ procedure TFormTrackerModify.CombineFiveTrackerListToOne(
begin
//Before

//remove duplicate from the list that need to be added.
RemoveTrackersFromList(TrackerFromInsideOneTorrentFile, FTrackerAddedByUserList);
//Must be place as first FTrackerAddedByUserList.
for TrackerStr in FTrackerAddedByUserList do
AddButIngnoreDuplicates(FTrackerFinalList, TrackerStr);

//Must be place as first FTrackerAddedByUserList.
for TrackerStr in FTrackerAddedByUserList do
AddButIngnoreDuplicates(FTrackerFinalList, TrackerStr);
//remove duplicate from the list.
RemoveTrackersFromList(TrackerFromInsideOneTorrentFile, FTrackerFinalList);

//original tracker list is second place (Keep original intact)
for TrackerStr in TrackerFromInsideOneTorrentFile do
Expand All @@ -1238,9 +1238,6 @@ procedure TFormTrackerModify.CombineFiveTrackerListToOne(
begin
//After

//remove duplicate from the list that need to be added.
RemoveTrackersFromList(TrackerFromInsideOneTorrentFile, FTrackerAddedByUserList);

//original tracker list is first place (Keep original intact)
for TrackerStr in TrackerFromInsideOneTorrentFile do
AddButIngnoreDuplicates(FTrackerFinalList, TrackerStr);
Expand Down

0 comments on commit 0225684

Please sign in to comment.