torrentListPropMap: deduplicate trackerDomains

Occasionally one torrent might have multiple tracker URLs from the
same domain. For instance, when there is separate ipv6 tracker URL
or when user use the "Set Tracker" feature.

Duplicate trackerDomains are not useful. It only causes the count
to be incremented multiple times and displayed incorrectly.
This commit is contained in:
Jesse Chan
2020-09-05 21:16:02 +08:00
parent bf6f05cbb7
commit 573dc9777d
+2 -1
View File
@@ -219,7 +219,8 @@ torrentListPropMap.set('trackerURIs', {
}
});
return trackerDomains;
// Deduplicate
return [...new Set(trackerDomains)];
},
});