torrentListPropMap: use d.hashing= instead of d.is_hash_checking=

d.hashing= allows Flood to show torrents queued for hashing.

Cherry-Pick: Flood-UI/flood#868
Signed-off-by: Jesse Chan <jc@linux.com>
This commit is contained in:
damolp
2020-03-17 04:52:29 +00:00
committed by Jesse Chan
parent 1ab3fa404e
commit fc7a74405f
3 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -53,9 +53,9 @@ torrentListPropMap.set('isComplete', {
transformValue: booleanTransformer,
});
torrentListPropMap.set('isHashChecking', {
methodCall: 'd.is_hash_checking=',
transformValue: booleanTransformer,
torrentListPropMap.set('isHashing', {
methodCall: 'd.hashing=',
transformValue: defaultTransformer,
});
torrentListPropMap.set('isOpen', {
+2 -2
View File
@@ -36,11 +36,11 @@ const getTorrentPercentCompleteFromDetails = (torrentDetails) => {
};
const getTorrentStatusFromDetails = (torrentDetails) => {
const {isHashChecking, isComplete, isOpen, upRate, downRate, state, message} = torrentDetails;
const {isHashing, isComplete, isOpen, upRate, downRate, state, message} = torrentDetails;
const torrentStatus = [];
if (isHashChecking) {
if (isHashing !== '0') {
torrentStatus.push(torrentStatusMap.checking);
} else if (isComplete && isOpen && state === '1') {
torrentStatus.push(torrentStatusMap.complete);
+2 -2
View File
@@ -35,10 +35,10 @@ const formatUtil = {
return string.substr(0, markerPosition);
},
status: (isHashChecking, isComplete, isOpen, uploadRate, downloadRate, state, message) => {
status: (isHashing, isComplete, isOpen, uploadRate, downloadRate, state, message) => {
const torrentStatus = [];
if (isHashChecking === '1') {
if (isHashing !== '0') {
torrentStatus.push('ch'); // checking
} else if (isComplete === '1' && isOpen === '1' && state === '1') {
torrentStatus.push('sd'); // seeding