Skip to content

Commit 5e44515

Browse files
authored
Adding Stopped state (#2893)
* Adding Stopped state in State section. * Changes for making Stopped State work.
1 parent 1029e8a commit 5e44515

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ <h4 class="offcanvas-title" id="offcanvas-sidepanel-label"></h4>
162162
<panel-label id="pstate_all" icon="all" uilangtext="All" selected></panel-label>
163163
<panel-label id="-_-_-dls-_-_-" icon="down" uilangtext="Downloading"></panel-label>
164164
<panel-label id="-_-_-com-_-_-" icon="completed" uilangtext="Finished"></panel-label>
165+
<panel-label id="-_-_-wfa-_-_-" icon="paused" uilangtext="Stopped"></panel-label>
165166
<panel-label id="-_-_-act-_-_-" icon="up-down" uilangtext="Active"></panel-label>
166167
<panel-label id="-_-_-iac-_-_-" icon="inactive" uilangtext="Inactive"></panel-label>
167168
<panel-label id="-_-_-err-_-_-" icon="error" uilangtext="Error"></panel-label>

js/category-list.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,17 @@ export class CategoryList {
2323
this.statistic = CategoryListStatistic.from("pview", this.viewSelections, {
2424
pstate: [
2525
(_, torrent) => [
26-
torrent.done < 1000 ? "-_-_-dls-_-_-" : "-_-_-com-_-_-",
26+
torrent.done >= 1000
27+
? "-_-_-com-_-_-"
28+
: (torrent.state === 1 && torrent.done === 0 && torrent.dl === 0 && torrent.ul === 0)
29+
? "-_-_-wfa-_-_-"
30+
: (torrent.done > 0 && torrent.dl === 0 && torrent.ul === 0)
31+
? "-_-_-wfa-_-_-"
32+
: (torrent.done === 0 && torrent.dl === 0 && torrent.ul === 0)
33+
? "-_-_-dls-_-_-"
34+
: (torrent.dl > 0 || torrent.ul > 0)
35+
? "-_-_-dls-_-_-"
36+
: "-_-_-dls-_-_-",
2737
torrent.dl >= 1024 || torrent.ul >= 1024
2838
? "-_-_-act-_-_-"
2939
: "-_-_-iac-_-_-",

0 commit comments

Comments
 (0)