Update a newly parsed Sone’s status directly after parsing.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 26 Jan 2013 00:03:01 +0000 (01:03 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 26 Jan 2013 00:03:01 +0000 (01:03 +0100)
src/main/java/net/pterodactylus/sone/core/SoneDownloader.java

index 388d804..abdea0d 100644 (file)
@@ -166,6 +166,7 @@ public class SoneDownloader extends AbstractService {
                        Sone parsedSone = parseSone(sone, fetchResults.getFetchResult(), fetchResults.getFreenetUri());
                        if (parsedSone != null) {
                                if (!fetchOnly) {
+                                       parsedSone.setStatus((parsedSone.getTime() == 0) ? SoneStatus.unknown : SoneStatus.idle);
                                        core.updateSone(parsedSone);
                                        addSone(parsedSone);
                                }