diff --git a/server/constants/torrentListPropMap.js b/server/constants/torrentListPropMap.js index 93edc5fe..e2e53e63 100644 --- a/server/constants/torrentListPropMap.js +++ b/server/constants/torrentListPropMap.js @@ -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', { diff --git a/server/services/torrentService.js b/server/services/torrentService.js index 2b4676cc..034b90eb 100644 --- a/server/services/torrentService.js +++ b/server/services/torrentService.js @@ -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); diff --git a/shared/util/formatUtil.js b/shared/util/formatUtil.js index 85b3c26c..4cae7b20 100644 --- a/shared/util/formatUtil.js +++ b/shared/util/formatUtil.js @@ -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