mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-20 16:51:10 +00:00
Bug Fix: Sort max stream column by total of streams from all profiles.
Some checks are pending
CI Pipeline / prepare (push) Waiting to run
CI Pipeline / docker (amd64, ubuntu-24.04) (push) Blocked by required conditions
CI Pipeline / docker (arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
CI Pipeline / create-manifest (push) Blocked by required conditions
Build and Push Multi-Arch Docker Image / build-and-push (push) Waiting to run
Frontend Tests / test (push) Waiting to run
Some checks are pending
CI Pipeline / prepare (push) Waiting to run
CI Pipeline / docker (amd64, ubuntu-24.04) (push) Blocked by required conditions
CI Pipeline / docker (arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
CI Pipeline / create-manifest (push) Blocked by required conditions
Build and Push Multi-Arch Docker Image / build-and-push (push) Waiting to run
Frontend Tests / test (push) Waiting to run
This commit is contained in:
parent
58f40ff276
commit
6d694c8475
1 changed files with 11 additions and 3 deletions
|
|
@ -585,15 +585,23 @@ const M3UTable = () => {
|
|||
},
|
||||
{
|
||||
header: 'Max Streams',
|
||||
accessorKey: 'max_streams',
|
||||
id: 'max_streams',
|
||||
accessorFn: (row) => {
|
||||
const activeProfiles = (row.profiles || []).filter(
|
||||
(p) => p.is_active
|
||||
);
|
||||
if (activeProfiles.length === 0) return row.max_streams;
|
||||
if (activeProfiles.some((p) => p.max_streams === 0)) return Infinity;
|
||||
return activeProfiles.reduce((sum, p) => sum + p.max_streams, 0);
|
||||
},
|
||||
sortable: true,
|
||||
size: 125,
|
||||
cell: ({ cell, row }) => {
|
||||
cell: ({ row }) => {
|
||||
const profiles = row.original.profiles || [];
|
||||
const activeProfiles = profiles.filter((p) => p.is_active);
|
||||
|
||||
if (activeProfiles.length <= 1) {
|
||||
const val = cell.getValue();
|
||||
const val = row.original.max_streams;
|
||||
return <Text size="xs">{val === 0 ? '∞' : val}</Text>;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue