mirror of
https://github.com/zoriya/flood.git
synced 2026-06-01 18:47:44 +00:00
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:
@@ -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', {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user