Skip to content

Commit 0225684

Browse files
Issue GerryFerdinandus#12 is wrong implemented
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
1 parent d7dc59b commit 0225684

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

source/code/main.pas

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,12 +1218,12 @@ procedure TFormTrackerModify.CombineFiveTrackerListToOne(
12181218
begin
12191219
//Before
12201220

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

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

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

1241-
//remove duplicate from the list that need to be added.
1242-
RemoveTrackersFromList(TrackerFromInsideOneTorrentFile, FTrackerAddedByUserList);
1243-
12441241
//original tracker list is first place (Keep original intact)
12451242
for TrackerStr in TrackerFromInsideOneTorrentFile do
12461243
AddButIngnoreDuplicates(FTrackerFinalList, TrackerStr);

0 commit comments

Comments
 (0)