forked from I2P_Developers/i2p.i2p
* i2psnark: Start torrents by default (ticket #1072)
This commit is contained in:
@ -1018,7 +1018,8 @@ public class SnarkManager implements CompleteListener {
|
|||||||
* @since 0.8.4
|
* @since 0.8.4
|
||||||
*/
|
*/
|
||||||
public void addMagnet(String name, byte[] ih, String trackerURL, boolean updateStatus) {
|
public void addMagnet(String name, byte[] ih, String trackerURL, boolean updateStatus) {
|
||||||
addMagnet(name, ih, trackerURL, updateStatus, shouldAutoStart(), this);
|
// updateStatus is true from UI, false from config file bulk add
|
||||||
|
addMagnet(name, ih, trackerURL, updateStatus, updateStatus, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -160,8 +160,8 @@ public class FetchAndAdd extends Snark implements EepGet.StatusListener, Runnabl
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
name = Storage.filterName(name);
|
String originalName = Storage.filterName(name);
|
||||||
name = name + ".torrent";
|
name = originalName + ".torrent";
|
||||||
File torrentFile = new File(_mgr.getDataDir(), name);
|
File torrentFile = new File(_mgr.getDataDir(), name);
|
||||||
|
|
||||||
String canonical = torrentFile.getCanonicalPath();
|
String canonical = torrentFile.getCanonicalPath();
|
||||||
@ -174,6 +174,8 @@ public class FetchAndAdd extends Snark implements EepGet.StatusListener, Runnabl
|
|||||||
} else {
|
} else {
|
||||||
// This may take a LONG time to create the storage.
|
// This may take a LONG time to create the storage.
|
||||||
_mgr.copyAndAddTorrent(file, canonical);
|
_mgr.copyAndAddTorrent(file, canonical);
|
||||||
|
snark = _mgr.getTorrentByBaseName(originalName);
|
||||||
|
snark.startTorrent();
|
||||||
}
|
}
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
_mgr.addMessage(_("Torrent at {0} was not valid", urlify(_url)) + ": " + ioe.getMessage());
|
_mgr.addMessage(_("Torrent at {0} was not valid", urlify(_url)) + ": " + ioe.getMessage());
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
2013-10-29 dg
|
||||||
|
* i2psnark: Start torrents by default (ticket #1072)
|
||||||
|
|
||||||
2013-10-29 zzz
|
2013-10-29 zzz
|
||||||
* i2psnark: Fix start and start-all buttons on text-mode browsers
|
* i2psnark: Fix start and start-all buttons on text-mode browsers
|
||||||
and Opera (ticket #1093)
|
and Opera (ticket #1093)
|
||||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
|||||||
/** deprecated */
|
/** deprecated */
|
||||||
public final static String ID = "Monotone";
|
public final static String ID = "Monotone";
|
||||||
public final static String VERSION = CoreVersion.VERSION;
|
public final static String VERSION = CoreVersion.VERSION;
|
||||||
public final static long BUILD = 16;
|
public final static long BUILD = 17;
|
||||||
|
|
||||||
/** for example "-test" */
|
/** for example "-test" */
|
||||||
public final static String EXTRA = "";
|
public final static String EXTRA = "";
|
||||||
|
Reference in New Issue
Block a user