From: David ‘Bombe’ Roden Date: Tue, 19 Feb 2013 19:15:49 +0000 (+0100) Subject: Only add the torrent if it doesn’t already exist. X-Git-Tag: 0.1~18 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=87cc39dc3c43bf007ead00ee8a515bb0636c016e;p=rhynodge.git Only add the torrent if it doesn’t already exist. --- diff --git a/src/main/java/net/pterodactylus/rhynodge/states/EpisodeState.java b/src/main/java/net/pterodactylus/rhynodge/states/EpisodeState.java index 7ed3dce..5d494e5 100644 --- a/src/main/java/net/pterodactylus/rhynodge/states/EpisodeState.java +++ b/src/main/java/net/pterodactylus/rhynodge/states/EpisodeState.java @@ -194,7 +194,9 @@ public class EpisodeState extends AbstractState implements Iterable { * The torrent file to add */ public void addTorrentFile(TorrentFile torrentFile) { - torrentFiles.add(torrentFile); + if (!torrentFiles.contains(torrentFile)) { + torrentFiles.add(torrentFile); + } } //