package net.pterodactylus.rhynodge.states;
import java.nio.charset.Charset;
+import java.util.Collection;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
//
/**
+ * Returns all torrent files of this state.
+ *
+ * @return All torrent files of this state
+ */
+ public Collection<TorrentFile> torrentFiles() {
+ return Collections.unmodifiableList(files);
+ }
+
+ /**
* Adds a torrent file to this state.
*
* @param torrentFile
List<NameValuePair> parameters = URLEncodedUtils.parse(magnetUri.substring("magnet:?".length()), Charset.forName("UTF-8"));
for (NameValuePair parameter : parameters) {
if (parameter.getName().equals("xt")) {
- return parameter.getValue();
+ return parameter.getValue().toLowerCase();
}
}
return null;