Set edition on parsed Sone.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / SoneInserter.java
index e23d1a9..41c1f82 100644 (file)
@@ -160,6 +160,17 @@ public class SoneInserter extends AbstractService {
                        /* check every seconds. */
                        sleep(1000);
 
+                       /* don’t insert locked Sones. */
+                       if (core.isLocked(sone)) {
+                               /* trigger redetection when the Sone is unlocked. */
+                               synchronized (sone) {
+                                       modified = !sone.getFingerprint().equals(lastInsertFingerprint);
+                               }
+                               lastFingerprint = "";
+                               lastModificationTime = 0;
+                               continue;
+                       }
+
                        InsertInformation insertInformation = null;
                        synchronized (sone) {
                                String fingerprint = sone.getFingerprint();