projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Download remote Sones first thing after adding them.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
core
/
Core.java
diff --git
a/src/main/java/net/pterodactylus/sone/core/Core.java
b/src/main/java/net/pterodactylus/sone/core/Core.java
index
265b8e1
..
d63b938
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/core/Core.java
+++ b/
src/main/java/net/pterodactylus/sone/core/Core.java
@@
-489,14
+489,23
@@
public class Core implements IdentityListener {
return null;
}
synchronized (remoteSones) {
return null;
}
synchronized (remoteSones) {
+ final Sone sone = getRemoteSone(identity.getId()).setIdentity(identity);
if (remoteSones.containsKey(identity.getId())) {
logger.log(Level.FINE, "Identity already exists: %s", identity);
return remoteSones.get(identity.getId());
}
if (remoteSones.containsKey(identity.getId())) {
logger.log(Level.FINE, "Identity already exists: %s", identity);
return remoteSones.get(identity.getId());
}
- Sone sone = new Sone(identity);
sone.setRequestUri(getSoneUri(identity.getRequestUri(), identity.getProperty("Sone.LatestEdition")));
remoteSones.put(identity.getId(), sone);
soneDownloader.addSone(sone);
sone.setRequestUri(getSoneUri(identity.getRequestUri(), identity.getProperty("Sone.LatestEdition")));
remoteSones.put(identity.getId(), sone);
soneDownloader.addSone(sone);
+ new Thread(new Runnable() {
+
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void run() {
+ soneDownloader.fetchSone(sone);
+ }
+
+ }, "Sone Downloader").start();
setSoneStatus(sone, SoneStatus.idle);
return sone;
}
setSoneStatus(sone, SoneStatus.idle);
return sone;
}