Skip to content

Commit

Permalink
add paused status
Browse files Browse the repository at this point in the history
TODO:
- other backends
- icon
- css/sass
  • Loading branch information
slikie committed Mar 23, 2021
1 parent 02aa24e commit ecb300f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client/src/javascript/components/sidebar/StatusFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ const StatusFilters: FC = observer(() => {
slug: 'downloading',
icon: <DownloadSmall />,
},
{
label: i18n._('filter.status.paused'),
slug: 'paused',
icon: <UploadSmall />,
},
{
label: i18n._('filter.status.seeding'),
slug: 'seeding',
Expand Down
1 change: 1 addition & 0 deletions client/src/javascript/i18n/strings/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"filter.status.checking": "Checking",
"filter.status.completed": "Complete",
"filter.status.downloading": "Downloading",
"filter.status.paused": "Paused",
"filter.status.error": "Error",
"filter.status.inactive": "Inactive",
"filter.status.seeding": "Seeding",
Expand Down
1 change: 1 addition & 0 deletions client/src/javascript/util/torrentStatusClasses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ function torrentStatusClasses(
'torrent--has-error': status.includes('error'),
'torrent--is-stopped': status.includes('stopped'),
'torrent--is-downloading': status.includes('downloading'),
'torrent--is-paused': status.includes('paused'),
'torrent--is-downloading--actively': downRate > 0,
'torrent--is-uploading--actively': upRate > 0,
'torrent--is-seeding': status.includes('seeding'),
Expand Down
1 change: 1 addition & 0 deletions server/services/qBittorrent/util/torrentPropertiesUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export const getTorrentStatusFromState = (state: QBittorrentTorrentState): Torre
statuses.push('downloading');
break;
case 'pausedDL':
statuses.push('paused');
statuses.push('inactive');
statuses.push('stopped');
break;
Expand Down
1 change: 1 addition & 0 deletions shared/constants/torrentStatusMap.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const torrentStatusMap = [
'checking',
'seeding',
'paused',
'complete',
'downloading',
'stopped',
Expand Down

0 comments on commit ecb300f

Please sign in to comment.