From 87cc39dc3c43bf007ead00ee8a515bb0636c016e Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 19 Feb 2013 20:15:49 +0100 Subject: [PATCH] =?utf8?q?Only=20add=20the=20torrent=20if=20it=20doesn?= =?utf8?q?=E2=80=99t=20already=20exist.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/rhynodge/states/EpisodeState.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); + } } // -- 2.7.4