fix: ensure no duplicate items

This commit is contained in:
Jeffrey Serio 2024-08-09 19:09:29 -05:00
parent cce5fd87bf
commit 75ecc058ec

View File

@ -47,7 +47,7 @@ if __name__ == "__main__":
torrent_infohashes.append(torrent.get("hash")) # type: ignore torrent_infohashes.append(torrent.get("hash")) # type: ignore
# Format the infohashes to have a \n at the end # Format the infohashes to have a \n at the end
format_infohashes = [f"{infohash}\n" for infohash in torrent_infohashes] format_infohashes = set([f"{infohash}\n" for infohash in torrent_infohashes])
# Create a NamedTemporaryFile and write all infohashes to it, one per line # Create a NamedTemporaryFile and write all infohashes to it, one per line
with tempfile.NamedTemporaryFile() as ntf: with tempfile.NamedTemporaryFile() as ntf: