Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mynij
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mynij
mynij
Commits
319c7fb7
Commit
319c7fb7
authored
Jan 21, 2021
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_mynij_search: fixup! remove torrent when seed is disabled
parent
2784739b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_erp5_mynij_webtorrent_js.js
...teItem/web_page_module/gadget_erp5_mynij_webtorrent_js.js
+13
-11
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_erp5_mynij_webtorrent_js.xml
...eItem/web_page_module/gadget_erp5_mynij_webtorrent_js.xml
+2
-2
No files found.
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_erp5_mynij_webtorrent_js.js
View file @
319c7fb7
...
...
@@ -535,17 +535,19 @@
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
))
{
// remove torrent seed
torrent_id
=
gadget
.
state
.
seed_index
[
item
.
id
].
infoHash
gadget
.
state
.
seed_index
[
item
.
id
].
destroy
(
function
()
{
var
element
=
torrentHtmlElement
(
torrent_id
);
console
.
log
(
"
Torrent of '
"
+
item
.
value
.
title
+
"
' destroyed...
"
);
if
(
element
)
element
.
remove
();
});
delete
gadget
.
state
.
seed_index
[
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
()
{
var
element
=
torrentHtmlElement
(
torrent_id
);
console
.
log
(
"
Torrent of '
"
+
item
.
value
.
title
+
"
' destroyed...
"
);
if
(
element
)
element
.
remove
();
});
delete
gadget
.
state
.
seed_index
[
item
.
id
];
}
}
}
return
RSVP
.
all
(
promise_list
);
...
...
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_erp5_mynij_webtorrent_js.xml
View file @
319c7fb7
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
989.306
43.58517.13209
</string>
</value>
<value>
<string>
989.306
50.55487.8328
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
1611
167690.79
</float>
<float>
1611
221391.77
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment