Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "D:downloadmanagernodewebtorrent.cmd" download "magnet:?xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10&dn=Sintel" --select 0 --out "D://nf/"
- @Override
- public synchronized void start() throws IOException {
- if (mWasDownloadStarted || mWasDownloadFinished) return;
- mExec.getCommand().listIterator().forEachRemaining(s -> {
- System.out.print(s + " ");
- });
- mExec.start();
- setProcessId();
- mWasDownloadStarted = true;
- mWasDownloadStopped = false;
- }
- private String buildCommand() {
- List <String> command = new ArrayList<>();
- command.add(""" + mManager.mWTLocation + """);
- command.add("download");
- command.add(""" + mManager.mMagnetUrl + """);
- if (mManager.mFileIndex >= 0) {
- command.add("--select " + mManager.mFileIndex);
- }
- if (mManager.mSaveTo != null) {
- command.add("--out "" + mManager.mSaveTo + """);
- }
- mManager.mExec.command(command);
- String cmdStr = "";
- for (String s : command) {
- cmdStr = cmdStr.concat(s + " ");
- }
- return cmdStr.trim();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement