Commit 319c7fb7 authored by Alain Takoudjou's avatar Alain Takoudjou

erp5_web_mynij_search: fixup! remove torrent when seed is disabled

parent 2784739b
......@@ -535,7 +535,8 @@
gadget.state.seed_index[item.id] = {};
promise_list.push(gadget.seedIndex(item.id));
console.log("call seed to " + item.id);
} else if (gadget.state.seed_index.hasOwnProperty(item.id)) {
} else if (!item.value.seed || item.value.seed === "off") {
if (gadget.state.seed_index.hasOwnProperty(item.id)) {
// remove torrent seed
torrent_id = gadget.state.seed_index[item.id].infoHash
gadget.state.seed_index[item.id].destroy(function () {
......@@ -548,6 +549,7 @@
delete gadget.state.seed_index[item.id];
}
}
}
return RSVP.all(promise_list);
})
.push(function () {
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>989.30643.58517.13209</string> </value>
<value> <string>989.30650.55487.8328</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1611167690.79</float>
<float>1611221391.77</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment