fix(qBittorrent): Missing states (#817)

This commit is contained in:
Alex Thomson
2024-11-06 18:04:14 +13:00
committed by GitHub
parent aae3d3c884
commit 1c1ddeeae5
2 changed files with 6 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ export type QBittorrentTorrentState =
| 'missingFiles'
| 'uploading'
| 'pausedUP'
| 'stoppedUP'
| 'queuedUP'
| 'stalledUP'
| 'checkingUP'
@@ -10,7 +11,9 @@ export type QBittorrentTorrentState =
| 'allocating'
| 'downloading'
| 'metaDL'
| 'forcedMetaDL'
| 'pausedDL'
| 'stoppedDL'
| 'queuedDL'
| 'stalledDL'
| 'checkingDL'

View File

@@ -41,6 +41,7 @@ export const getTorrentStatusFromState = (state: QBittorrentTorrentState): Torre
statuses.push('seeding');
break;
case 'pausedUP':
case 'stoppedUP':
statuses.push('complete');
statuses.push('inactive');
statuses.push('stopped');
@@ -61,12 +62,14 @@ export const getTorrentStatusFromState = (state: QBittorrentTorrentState): Torre
statuses.push('downloading');
break;
case 'metaDL':
case 'forcedMetaDL':
case 'downloading':
case 'forcedDL':
statuses.push('active');
statuses.push('downloading');
break;
case 'pausedDL':
case 'stoppedDL':
statuses.push('inactive');
statuses.push('stopped');
break;